Fix 2 — lastmile should only be yes if EDR last mile.

This commit is contained in:
Hagernesh
2026-07-31 13:06:32 +00:00
parent be75a9e867
commit d229808fd8
5 changed files with 225 additions and 31 deletions

View File

@@ -158,6 +158,14 @@ export class BookingJourneyService {
this.events.emit('booking.completed', { bookingId });
}
// The cargo is physically off the train at its own yard — mid-corridor or
// final. WarehouseInventoryService picks this up to create the warehouse
// record (import/intercity only; export already has one from receive).
this.events.emit('booking.unloadedAtYard', {
bookingId,
tradeDirection: booking.tradeDirection,
});
// Customer tracking: THIS booking arrived (train may still be rolling).
void this.completeMilestones(booking, [
...(booking.tradeDirection === 'IMPORT'