Some checks failed
tests / ci (pull_request) Has been cancelled
- Implemented StudentService to retrieve all students for selection. - Created migration for tuition_invoices and tuition_payments tables. - Added seeders for TuitionInvoice and TuitionPayment with sample data. - Updated DatabaseSeeder to include new seeders. - Developed UI components for managing tuition invoices and payments, including forms and data tables. - Introduced RupiahInput component for formatted currency input. - Added routes for tuition invoices and payments management. - Defined TypeScript types for tuition invoices and payments.
13 lines
318 B
TypeScript
13 lines
318 B
TypeScript
export function formatRupiah(
|
|
value: string | number | null | undefined,
|
|
): string {
|
|
const amount = Number(value ?? 0);
|
|
|
|
return new Intl.NumberFormat('id-ID', {
|
|
style: 'currency',
|
|
currency: 'IDR',
|
|
minimumFractionDigits: 0,
|
|
maximumFractionDigits: 0,
|
|
}).format(amount);
|
|
}
|