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) {