mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-26 18:42:49 +00:00
keep cents in CBE bills and prices
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user