mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-26 18:42:49 +00:00
fix
This commit is contained in:
@@ -4005,6 +4005,14 @@ export class WarehouseInventoryService {
|
||||
[handoverId],
|
||||
);
|
||||
if (!h) throw new NotFoundException(`Handover ${handoverId} not found`);
|
||||
// Self-haul stays a single booking-level signature via approve-delivery,
|
||||
// which also enforces inspection-passed + truck-arrived. Per-truck signing
|
||||
// is an EDR last-mile flow only.
|
||||
if (h.mileType !== 'EDR_LAST_MILE') {
|
||||
throw new BadRequestException(
|
||||
'This handover is signed through Approve delivery, not per truck',
|
||||
);
|
||||
}
|
||||
|
||||
// Same gate as approve-delivery: storage/demurrage must be settled first.
|
||||
const [inv]: Array<{ id: string; warehouseId: string | null }> = await this.dataSource.query(
|
||||
|
||||
Reference in New Issue
Block a user