mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-27 00:52:50 +00:00
Import's customer_truck_assignments.arrived_at is set by a separate later gate action (release()'s arrival branch — the truck returning to collect already-warehoused goods). Export has no equivalent second step: the truck delivering cargo to the warehouse arrives and is received in the same act, so its arrival was never recorded anywhere. Add markCustomerTruckArrived, mirroring release()'s existing self-haul departure UPDATE (plate-matched, COALESCE(arrived_at, NOW())), and call it from receive()/bulkReceive() for EXPORT bookings