TorbatYar/frontend/lib/utils.ts
Mortezakoohjani 12c8615615 Ship enterprise Accounting FE/API with CRUD parity and production wiring.
Adds accounting-service PATCH/archive, fiscal helpers, COA templates and setup status, plus SuperApp Accounting UI (DS, scoreboard, masters, vouchers, ledger, ops modules) with session refresh and HTTPS public API URLs.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-24 15:26:43 +03:30

14 lines
509 B
TypeScript

import { type ClassValue, clsx } from "clsx";
import { twMerge } from "tailwind-merge";
export function cn(...inputs: ClassValue[]) {
return twMerge(clsx(inputs));
}
export function formatMoney(value: string | number | null | undefined, locale = "fa-IR") {
if (value === null || value === undefined || value === "") return "—";
const n = typeof value === "string" ? Number(value) : value;
if (Number.isNaN(n)) return String(value);
return new Intl.NumberFormat(locale).format(n);
}