fix: reject missing receiving pallet
This commit is contained in:
+1
@@ -257,6 +257,7 @@ public class ReceivingContainerService {
|
|||||||
String customerId = session.getCustomerId();
|
String customerId = session.getCustomerId();
|
||||||
InboundRef ref = requireInbound(customerId, session.getContainerNo(), request.inboundCode());
|
InboundRef ref = requireInbound(customerId, session.getContainerNo(), request.inboundCode());
|
||||||
WarehouseResourceGateway.WarehousePalletReference pallet = warehouse.resolvePallet(request.palletCode());
|
WarehouseResourceGateway.WarehousePalletReference pallet = warehouse.resolvePallet(request.palletCode());
|
||||||
|
if (pallet == null) throw notFound("Pallet was not found");
|
||||||
validatePallet(ref, pallet);
|
validatePallet(ref, pallet);
|
||||||
return new ReceivingContainerResponses.PalletResolved(pallet.palletNo(), pallet.warehouseId(), pallet.status(),
|
return new ReceivingContainerResponses.PalletResolved(pallet.palletNo(), pallet.warehouseId(), pallet.status(),
|
||||||
pallet.fbaWarehouseCode(), ref.line().getInboundCode(), destinationType(ref.line(), ref.order()), true);
|
pallet.fbaWarehouseCode(), ref.line().getInboundCode(), destinationType(ref.line(), ref.order()), true);
|
||||||
|
|||||||
Reference in New Issue
Block a user