Payment discrepancy fixes

This commit is contained in:
Stephanos A
2026-07-20 23:09:06 +03:00
parent 226f839ad0
commit 2deb5a4a8e
3 changed files with 7 additions and 5 deletions

View File

@@ -86,9 +86,9 @@ function fmtMinor(minor: number) {
return `ETB ${(minor / 100).toLocaleString('en-US', { minimumFractionDigits: 2 })}`;
}
// paidMinor from PaymentIntent.amountMinor is a Float stored as full units (not cents)
// paidMinor from PaymentIntent.amountMinor is converted to cents server-side before being returned
function fmtPaid(amount: number) {
return `ETB ${amount.toLocaleString('en-US', { minimumFractionDigits: 2 })}`;
return `ETB ${(amount / 100).toLocaleString('en-US', { minimumFractionDigits: 2 })}`;
}
function downloadCsv(csv: string, filename: string) {

View File

@@ -66,7 +66,7 @@ const navigationSections: { title: string; items: NavItem[] }[] = [
{ name: 'Tickets', href: '/tickets', icon: FileText, permission: PERMS.tickets.view },
{ name: 'Boarding', href: '/boarding', icon: LogIn, permission: PERMS.tickets.view },
{ name: 'Luggage', href: '/excess-baggage', icon: Banknote, permission: PERMS.bookings.view },
{ name: 'Discrepancy', href: '/discrepancy', icon: Layers, permission: PERMS.seats.manage },
// { name: 'Discrepancy', href: '/discrepancy', icon: Layers, permission: PERMS.seats.manage },
]
},
{