From 3d741ab92854127df6b5845178a1ae6d6df957d8 Mon Sep 17 00:00:00 2001 From: Abubeker Yasin Date: Sat, 22 Aug 2026 10:48:34 +0300 Subject: [PATCH] fix: ( passenger-portal ) fix payment amount on booking confirmation --- .../portal/src/app/booking/confirmation/page.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/apps/edr-passenger-web/portal/src/app/booking/confirmation/page.tsx b/apps/edr-passenger-web/portal/src/app/booking/confirmation/page.tsx index d60918752..7ed9aa0ad 100644 --- a/apps/edr-passenger-web/portal/src/app/booking/confirmation/page.tsx +++ b/apps/edr-passenger-web/portal/src/app/booking/confirmation/page.tsx @@ -659,8 +659,13 @@ export default function ConfirmationPage() { {(() => { // The server-confirmed settled amount is authoritative — prefer it over // any client-side session state, which can go stale (e.g. after a refresh). + // Despite its name, PaymentIntent.amountMinor holds MAJOR units — it is the + // charge amount produced by currencyService.*ToChargeMajor (see initiate() in + // payments.service.ts; reports.service.ts multiplies it by 100 to get real + // minor units). Do NOT divide by 100 here — the voucher does the same via + // fareIsMajorUnits. if (_booking?.payment?.amountMinor != null) { - return `${_booking.payment.currency || 'ETB'} ${(_booking.payment.amountMinor / 100).toFixed(2)}`; + return `${_booking.payment.currency || 'ETB'} ${_booking.payment.amountMinor.toFixed(2)}`; } if (reviewedTotalMinor != null) return `${paidCurrency || 'ETB'} ${(reviewedTotalMinor / 100).toFixed(2)}`;