Merge pull request #1198 from Tria-plc/freight_feature/usermanagement

keep cents in CBE bills and prices
This commit is contained in:
marshal
2026-08-09 00:14:55 +03:00
committed by GitHub

View File

@@ -279,9 +279,10 @@ export class BookingPricingService {
return {
lineItems,
// Grand total is billed in whole currency units — fractional line sums
// (rate × tons can yield e.g. 260519.2) round to the nearest whole birr/USD.
totalAmount: Math.round(total),
// Grand total keeps its cents, matching the line items it sums — rounding
// to whole birr made the total disagree with the breakdown (135,375.61 of
// lines shown as a 135,376.00 total) and CBE bills this figure to the cent.
totalAmount: round2(total),
currency: booking.paymentCurrency,
usedRates: [...usedRatesMap.values()],
appliedModifiers: ruleResult.appliedModifiers,