<?php

if (!function_exists('format_money')) {
    function format_money(int|float|null $piasters, string $currency = 'ج.م'): string
    {
        if ($piasters === null) {
            $piasters = 0;
        }

        return number_format($piasters / 100, 2) . ' ' . $currency;
    }
}
