Keep booked income and expense separate from cash balances, with installments, recurring items, and reports. Co-authored-by: Cursor <cursoragent@cursor.com>
6 lines
220 B
TypeScript
6 lines
220 B
TypeScript
export function toman(value: string | number | null | undefined) {
|
||
const n = Number(value ?? 0);
|
||
if (!Number.isFinite(n)) return '۰';
|
||
return `${new Intl.NumberFormat('fa-IR').format(Math.round(n))} تومان`;
|
||
}
|