From 229d9c66513a953d2a7d13ba835e428a545bd746 Mon Sep 17 00:00:00 2001 From: Marshal Date: Sat, 8 Aug 2026 10:47:48 +0000 Subject: [PATCH] feat(freight-web): restrict booking currency to ETB and portal ETB payments to CBE bill only --- .../contracts/GlCreateBookingForm.tsx | 14 ++------- .../src/pages/bookings/NewBookingPage.tsx | 5 +-- .../portal/public/assets/cbe.png | Bin 0 -> 280872 bytes .../components/PaymentMethodModal.tsx | 29 ++++++++++-------- .../src/pages/bookings/EditBookingPage.tsx | 4 +-- .../pages/bookings/new-booking-form/schema.ts | 8 ++--- .../new-booking-form/step8-review.tsx | 2 +- .../src/pages/contracts/NewShipmentPage.tsx | 12 +++----- .../CurrencySelector/CurrencySelector.tsx | 9 ++---- 9 files changed, 31 insertions(+), 52 deletions(-) create mode 100644 apps/edr-freight-web/portal/public/assets/cbe.png diff --git a/apps/edr-freight-web/backoffice/src/components/contracts/GlCreateBookingForm.tsx b/apps/edr-freight-web/backoffice/src/components/contracts/GlCreateBookingForm.tsx index 42ecbce61..5502886d3 100644 --- a/apps/edr-freight-web/backoffice/src/components/contracts/GlCreateBookingForm.tsx +++ b/apps/edr-freight-web/backoffice/src/components/contracts/GlCreateBookingForm.tsx @@ -276,9 +276,8 @@ export default function GlCreateBookingForm() { const [trainScheduleId, setTrainScheduleId] = useState(""); const [contractRouteId, setContractRouteId] = useState(null); const [notes, setNotes] = useState(""); - // The customer states the billing currency on their shipment request — GL - // books in it. Intercity is always ETB (the API enforces this too). - const [paymentCurrency, setPaymentCurrency] = useState<"USD" | "ETB">("USD"); + // ponytail: ETB-only for now — widen back to "USD" | "ETB" when multi-currency billing returns. + const [paymentCurrency, setPaymentCurrency] = useState<"USD" | "ETB">("ETB"); // What the containers carry — captured per booking (moved off the contract). const [cargoDescription, setCargoDescription] = useState(""); const [containerLines, setContainerLines] = useState([]); @@ -449,9 +448,6 @@ export default function GlCreateBookingForm() { } if (bookingRequest.contractRouteId) setContractRouteId(bookingRequest.contractRouteId); - if (bookingRequest.paymentCurrency === "USD" || bookingRequest.paymentCurrency === "ETB") { - setPaymentCurrency(bookingRequest.paymentCurrency); - } if (bookingRequest.notes) setNotes(bookingRequest.notes); }, [bookingRequest, prefilled]); @@ -1761,11 +1757,7 @@ export default function GlCreateBookingForm() { Billing currency - {isIntercity - ? "Intercity shipments are invoiced in ETB." - : bookingRequest?.paymentCurrency - ? "Requested by the customer on their shipment request." - : "The contract is quoted in USD — pick the currency this shipment is invoiced in."} + Shipments are invoiced in ETB.