Files
edr-platform/apps/edr-freight-api/src/modules
Hagernesh a95667fde4 fix(warehouse): raise a GRN on every warehouse receipt
Requiring a GRN before loading only works if every path into the warehouse
issues one. Two did not: autoUnloadArrived and unloadBooking created RECEIVED
inventory with a null grn_number, so cargo that genuinely arrived — by first
mile or self haul — would have been stuck un-loadable behind the new gate.

Both now stamp a GRN, derived from the booking's trade direction, matching
receive/bulkReceive/autoUnloadArrivedBookings. unloadBooking keeps an
already-issued GRN when it re-unloads an existing row rather than reissuing one.

Every path that creates warehouse inventory now issues a GRN, so the chain is
seamless: booking arrives (first mile or self haul) -> received -> GRN -> loadable
onto its allocated wagon.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-17 08:01:58 +00:00
..
2026-07-16 00:33:31 +00:00
2026-07-06 12:05:52 +00:00
2026-07-16 00:33:31 +00:00
2026-07-16 00:33:31 +00:00
2026-06-16 09:06:11 +00:00
2026-07-16 00:33:31 +00:00
2026-07-07 10:00:48 +00:00
fix
2026-07-03 15:21:23 +00:00
2026-07-16 00:33:31 +00:00
gps
2026-07-10 15:23:49 +00:00
2026-07-16 00:33:31 +00:00
2026-07-16 00:33:31 +00:00
2026-07-16 00:33:31 +00:00
2026-07-16 00:33:31 +00:00
2026-07-16 00:33:31 +00:00
2026-07-16 01:05:57 +00:00
2026-07-04 06:19:35 +00:00
2026-07-06 12:05:52 +00:00
2026-07-16 00:33:31 +00:00
2026-07-16 01:05:57 +00:00
2026-07-16 00:33:31 +00:00
2026-07-16 00:33:31 +00:00
2026-07-16 00:33:31 +00:00
2026-07-14 11:06:49 +00:00
2026-07-16 00:33:31 +00:00
2026-07-07 10:00:48 +00:00
fix
2026-07-03 16:36:08 +03:00
2026-07-16 00:33:31 +00:00