Commit Graph

4220 Commits

Author SHA1 Message Date
Hagernesh
e12cb78e9b feat(portal): pay-later last-mile note, gated by service type
Last-mile toggle explains deferred billing (confirm containers after
Djibouti departure, sign supplementary LM contract on truck approval,
pay advance) — shown only when the service defers mile billing, not
for RAIL_CONTAINER_PAID_MILE where the mile is priced into the booking.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-08 05:24:22 +00:00
Hagernesh
c77f5200a3 feat(last-mile): default the approval advance to the live rate
The chief's typed advance was mandatory, so the rule-based estimate shown in
the approve dialog had to be retyped and could silently diverge from it.

advanceAmount is now optional: the advance defaults to the live last-mile
rate estimate (km x rate) and the typed value is only an override. When no
rate covers the job the request is rejected with a message telling the chief
to enter the amount manually, rather than approving a zero advance.

The advance invoice now bills in the rate's currency from the snapshotted
contract summary, falling back to the booking payment currency only when the
amount came from a manual override.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-07 11:43:18 +00:00
Hagernesh
95fad6f095 Bulk (per ton per km) last-mile rates now carry From/To km bands like
container mode: the Add Rate dialog offers the multi-tier editor in both
modes, each tier is created as its own rate row, and overlapping bulk
bands are rejected. Pricing picks the tier whose half-open band holds
the trip km, falling back to the legacy bandless bulk rate.
2026-08-06 08:56:35 +00:00
Hagernesh
69f6fd36a9 fix(rates): render stored rate currency, default last mile to birr
The rate matrix currency cell hardcoded USD, so a last-mile rate
priced in ETB still displayed as dollars. formatCell now takes the
row and reads its currency code, falling back to USD.

Last-mile currency select gets defaultValue ETB (new generic
FormFieldDef.defaultValue for create-time pre-selection) and lists
ETB (Birr) first; USD stays selectable. Backend already persisted
and validated the chosen currency.
2026-08-06 08:56:35 +00:00
Hagernesh Tadesse
b4ac92e14e Merge pull request #1140 from Tria-plc/lastmilerequest 2026-08-06 01:19:08 -07:00
Hagernesh Tadesse
a5b89a3aa0 Merge pull request #1139 from Tria-plc/dev
Merge pull request #1138 from Tria-plc/lastmilerequest
2026-08-06 11:15:43 +03:00
Hagernesh Tadesse
4199e48b42 Merge pull request #1138 from Tria-plc/lastmilerequest
Last mile Contract
2026-08-06 10:21:30 +03:00
Hagernesh
4786c896b5 feat(last-mile): customer-signed LM contract gates the advance invoice
Approval now snapshots the rate estimate and generates a last-mile
contract instead of invoicing immediately. The customer picks a delivery
date on the confirm form, then reviews and signs the contract in the
portal (saved signature or drawn); the signed PDF is stored as
LM_<CustomerName>.pdf and only then is the advance invoice issued.
Backoffice shows signature status and the contract download.
2026-08-06 07:11:23 +00:00
Hagernesh
4716aa14c3 feat(rates): multi-tier distance band entry in last-mile rate form
- tierList field type in rule-engine form dialog (add/remove rows,
  overlap + open-ended validation, From km auto-continues)
- create submits one rate row per tier sequentially
- editing a band row keeps the single From/To/value form
2026-08-06 07:11:23 +00:00
Stephanos A.
ea9df4407e Merge pull request #1137 from Tria-plc/alpha
Restored EXCESS_BAGGAGE as PaymentReferenceType
2026-08-06 08:58:41 +03:00
Stephanos A
3b49c49e42 Restored EXCESS_BAGGAGE as PaymentReferenceType 2026-08-06 08:54:21 +03:00
Nathnael Wondisha
7f90ccc1b5 Merge pull request #1135 from Tria-plc/staging
Staging
2026-08-06 08:37:23 +03:00
Stephanos A.
ad186ece57 Merge pull request #1136 from Tria-plc/alpha
Excess baggage payment link quick fix
2026-08-06 08:30:33 +03:00
Stephanos A
405ba908c3 Excess baggage payment link quick fix 2026-08-06 08:14:34 +03:00
Stephanos A.
15c4113b28 Merge pull request #1118 from Tria-plc/alpha
Alpha
2026-08-06 07:49:35 +03:00
marshal
5ba414db00 Merge pull request #1134 from Tria-plc/freight_feature/usermanagement
add metadata to ignore audit logging in payment events
2026-08-06 01:28:56 +03:00
Marshal
5933795116 add metadata to ignore audit logging in payment events 2026-08-05 22:26:04 +00:00
Hagernesh Tadesse
9bf776859f Merge pull request #1133 from Tria-plc/lastmilerequest
feat(rates): last-mile rate rules with bulk per-ton-km and container …
2026-08-06 01:14:47 +03:00
Hagernesh
5c8c68e990 feat(rates): last-mile rate rules with bulk per-ton-km and container distance bands
- rates: min_km/max_km columns, PER_TON_KM unit, ETB|USD currency for last mile
- extend UQ_rates_pattern with band start; overlap + shape validation
- shared last-mile charge resolver; approve-dialog price estimate endpoint
- delivery-fee invoice prices via rules, falls back to vehicle price/km
- backoffice: last-mile rate form (mode, container type, band, currency)
2026-08-05 22:13:42 +00:00
marshal
8bb8b58185 Merge pull request #1132 from Tria-plc/dev
freight dev
2026-08-06 00:07:26 +03:00
marshal
6125f644b1 Merge pull request #1131 from Tria-plc/freight_feature/usermanagement
feat(billing): enhance invoice payment processing and revert handling
2026-08-05 23:55:18 +03:00
Hagernesh Tadesse
be385e2d32 Merge pull request #1130 from Tria-plc/lastmilerequest
feat(mile): auto-estimate first/last-mile km from yard GPS to custome…
2026-08-05 23:51:18 +03:00
Marshal
8089e5cfd9 feat(billing): enhance invoice payment processing and revert handling
feat(bookings): add event handlers for booking invoice payment processing
fix(bookings): include PAYMENT_VERIFICATION_IN_PROGRESS status in queries
fix(train-scheduling): update status checks to include PAYMENT_VERIFICATION_IN_PROGRESS
feat(notifier): notify customers when a train is cancelled
2026-08-05 20:46:44 +00:00
Hagernesh
1ee941c0df feat(mile): auto-estimate first/last-mile km from yard GPS to customer point 2026-08-05 20:30:17 +00:00
Hagernesh Tadesse
634e1f3257 Merge pull request #1129 from Tria-plc/lastmilerequest
feat(rule-engine): add yard_locations table, seed 5 facility yard GPS…
2026-08-05 23:19:10 +03:00
Hagernesh
334236aa10 feat(rule-engine): add yard_locations table, seed 5 facility yard GPS coords 2026-08-05 20:16:25 +00:00
marshal
ca109d88d2 Merge pull request #1128 from Tria-plc/freight_feature/usermanagement
Freight feature/usermanagement
2026-08-05 23:05:39 +03:00
Marshal
1b5f364294 feat(fleet): add permanent delete option to FleetRecordActions 2026-08-05 20:05:05 +00:00
Hagernesh Tadesse
d6c5861847 Merge pull request #1127 from Tria-plc/lastmilerequest
Last mile confirmation request , approval, payment Feature
2026-08-05 23:04:52 +03:00
Hagernesh
1f4d659ffb Last mile confirmation request , approval, payment Feature 2026-08-05 20:01:48 +00:00
Stephanos A
bf8906f983 Boarding status update issue fix 2026-08-05 21:32:23 +03:00
marshal
2d87794bf8 Merge pull request #1126 from Tria-plc/freight_feature/usermanagement
clarify replayed CBE payment failure msg
2026-08-05 18:15:36 +03:00
Marshal
1a37b62f24 clarify replayed CBE payment failure msg 2026-08-05 15:14:41 +00:00
marshal
2156f16a29 Merge pull request #1125 from Tria-plc/dev
deploy freight
2026-08-05 17:26:24 +03:00
Nathnael Wondisha
37d0cc966a Merge pull request #1124 from Tria-plc/freight/nati-2
Audit log and presistent cbe pnr
2026-08-05 17:23:54 +03:00
Nathnael
2133d6a574 fix: fitler out the client side request 2026-08-05 14:23:00 +00:00
marshal
3be6f53f9e Merge pull request #1123 from Tria-plc/freight_feature/usermanagement
add log for payment
2026-08-05 17:21:47 +03:00
Marshal
f7d7bab702 add log for payment 2026-08-05 14:19:45 +00:00
Nathnael
595c165820 feat: implement audit logs 2026-08-05 14:17:00 +00:00
marshal
ab0dee9e07 Merge pull request #1122 from Tria-plc/freight_feature/usermanagement
fix issue
2026-08-05 17:02:42 +03:00
Marshal
b5eeb7c3a3 fix issue 2026-08-05 14:01:01 +00:00
Nathnael
d5622ed360 chore: install auditlog pkg 2026-08-05 13:39:45 +00:00
Nathnael
4f08b370e1 Merge branch 'dev' into freight/nati-2 2026-08-05 13:27:10 +00:00
Nathnael
8476a6a00e fix: the fayda and etrade syncing 2026-08-05 13:06:56 +00:00
marshal
3c89c04727 Merge pull request #1121 from Tria-plc/freight_feature/usermanagement
feat(billing): add PAYMENT_PROCESSING invoice status on payment succe…
2026-08-05 16:03:44 +03:00
Marshal
b7dcc1bf0a feat(billing): add PAYMENT_PROCESSING invoice status on payment success redirect (all except CBE bill) 2026-08-05 12:59:37 +00:00
marshal
26837d5a7d Merge pull request #1120 from Tria-plc/freight_feature/usermanagement
Freight feature/usermanagement
2026-08-05 13:08:23 +03:00
Marshal
ceabe163e7 fix issue 2026-08-05 09:46:39 +00:00
Nathnael Wondisha
bfe8ef2391 Merge pull request #1119 from Tria-plc/dev
syncing
2026-08-05 11:51:46 +03:00
Nathnael Wondisha
a0f0be5be5 Merge pull request #1116 from Tria-plc/fixes
squashed migration files
2026-08-05 11:41:12 +03:00