fix: complete dropship container after pallet receipt
This commit is contained in:
+1
@@ -927,6 +927,7 @@ public class ReceivingContainerService {
|
||||
private void validateFbaSkuBalance(String customerId, String containerNo) {
|
||||
for (InboundRef ref : refs(customerId, containerNo)) {
|
||||
if (!"FBA".equals(destinationType(ref.line(), ref.order()))) continue;
|
||||
if ("ONE_CLICK_DROPSHIP".equals(ref.order().getOrderType())) continue;
|
||||
List<SkuExpectation> skuCodes = skuExpectations(ref);
|
||||
int received = 0;
|
||||
for (SkuExpectation sku : skuCodes) {
|
||||
|
||||
+18
@@ -448,6 +448,24 @@ class ReceivingContainerServiceBehaviorTest {
|
||||
verify(workflow, never()).completeContainer(any(), any());
|
||||
}
|
||||
|
||||
@Test
|
||||
void dropshipWholePalletCanCompleteWithoutBulkSkuReceiptRows() {
|
||||
stubCurrent("FBA", "CONT-A");
|
||||
LastlegOrder dropshipOrder = order("FBA");
|
||||
dropshipOrder.setOrderType("ONE_CLICK_DROPSHIP");
|
||||
when(orders.selectById(1L)).thenReturn(dropshipOrder);
|
||||
InboundPlanPalletAllocation received = new InboundPlanPalletAllocation();
|
||||
received.setLineId(10L); received.setPickedPackageCount(2);
|
||||
when(allocations.selectList(any())).thenReturn(List.of(received));
|
||||
when(sessions.updateById(any(ReceivingContainerSession.class))).thenReturn(1);
|
||||
|
||||
var completed = service.complete("7", new ReceivingContainerRequests.Action("dropship-complete"));
|
||||
|
||||
assertThat(completed.status()).isEqualTo("COMPLETED");
|
||||
verifyNoInteractions(skuReceipts);
|
||||
verify(workflow).completeContainer(any(), any());
|
||||
}
|
||||
|
||||
@Test
|
||||
void completedRequestReplaysWithoutAnActiveCustomerSession() {
|
||||
ReceivingContainerOperation operation = new ReceivingContainerOperation();
|
||||
|
||||
Reference in New Issue
Block a user