mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-08 00:02:15 +01:00
change e2e tests to use organization default values for money formatting
This commit is contained in:
17
e2e/utils/money.ts
Normal file
17
e2e/utils/money.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
import { formatCents } from '../../resources/js/packages/ui/src/utils/money';
|
||||
import type { CurrencyFormat } from '../../resources/js/packages/ui/src/utils/money';
|
||||
import { 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
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user