mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-08 16:22:16 +01:00
18 lines
590 B
TypeScript
18 lines
590 B
TypeScript
import { formatCents } from '../../resources/js/packages/ui/src/utils/money';
|
|
import type { CurrencyFormat } from '../../resources/js/packages/ui/src/utils/money';
|
|
import type { NumberFormat } from '../../resources/js/packages/ui/src/utils/number';
|
|
|
|
export function formatCentsWithOrganizationDefaults(
|
|
cents: number,
|
|
currencyCode: string = 'EUR',
|
|
currencySymbol: string = '€'
|
|
): string {
|
|
return formatCents(
|
|
cents,
|
|
currencyCode,
|
|
'iso-code-after-with-space' as CurrencyFormat,
|
|
currencySymbol,
|
|
'point-comma' as NumberFormat
|
|
);
|
|
}
|