Files
edr-platform/apps/edr-passenger-api
Muluhabt acd4b37d59 fix(bookings): apply promo discount to client-subtotal totals in guest/authenticated booking
createGuestBooking (ONE_WAY) and createGuestRoundTripBooking overwrote the
authoritative discounted total with an undiscounted client-provided subtotal
(per-seat sum or reviewedTotalMinor) whenever one was present, silently
dropping a valid promos discount at booking-creation time, even though the
same promo was correctly applied in the fare-breakdown/quote step. Only the
no-client-subtotal fallback branch subtracted discountMinor.

Mirrors the existing usedClientSubtotal fix already present in
BookingsService.createOneWayBooking (H-13): subtract discountMinor from the
client subtotal before storing it, in ETB and display currency. TRANSIT and
ROUND_TRIP_TRANSIT were unaffected since neither overrides with a client
subtotal.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-28 09:42:27 +03:00
..
2026-05-12 15:17:16 +03:00