Skip to content

Commit

Permalink
Misc changes
Browse files Browse the repository at this point in the history
  • Loading branch information
TheBestPessimist committed Jul 8, 2020
1 parent 9c1da26 commit 7703e94
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 27 deletions.
Expand Up @@ -382,13 +382,13 @@ public I_M_HU_LUTU_Configuration createAndSaveNewLUTUConfig()
configureLUTUConfigTU(lutuConfigNew, M_HU_PI_Item_Product_ID, qtyTU);

// LU
configureLUTUConfigLU(lutuConfigNew, lu_PI_Item_ID);
configureLUTUConfigLU(lutuConfigNew, lu_PI_Item_ID, getQtyLU());

lutuConfigurationFactory.save(lutuConfigNew);
return lutuConfigNew;
}

private void configureLUTUConfigTU(
private static void configureLUTUConfigTU(
@NonNull final I_M_HU_LUTU_Configuration lutuConfigNew,
final HUPIItemProductId M_HU_PI_Item_Product_ID,
@NonNull final BigDecimal qtyTU)
Expand All @@ -402,13 +402,13 @@ private void configureLUTUConfigTU(
lutuConfigNew.setIsInfiniteQtyTU(false);
}

private void configureLUTUConfigLU(
private static void configureLUTUConfigLU(
@NonNull final I_M_HU_LUTU_Configuration lutuConfigNew,
final int lu_PI_Item_ID)
final int lu_PI_Item_ID,
final BigDecimal qtyLU)
{
if (lu_PI_Item_ID > 0)
{
final BigDecimal qtyLU = getQtyLU();
if (qtyLU == null || qtyLU.signum() <= 0)
{
throw new FillMandatoryException(PARAM_QtyLU);
Expand Down
Expand Up @@ -136,27 +136,6 @@ else if (type == PPOrderLineType.BOMLine_ByCoProduct)
}
}

private final IPPOrderReceiptHUProducer newReceiptCandidatesProducer()
{
final PPOrderLineRow row = getSingleSelectedRow();

final PPOrderLineType type = row.getType();
if (type == PPOrderLineType.MainProduct)
{
final PPOrderId ppOrderId = row.getOrderId();
return huPPOrderBL.receivingMainProduct(ppOrderId);
}
else if (type == PPOrderLineType.BOMLine_ByCoProduct)
{
final PPOrderBOMLineId ppOrderBOMLineId = row.getOrderBOMLineId();
return huPPOrderBL.receivingByOrCoProduct(ppOrderBOMLineId);
}
else
{
throw new AdempiereException("Receiving is not allowed");
}
}

@Override
protected ProcessPreconditionsResolution checkPreconditionsApplicable()
{
Expand Down Expand Up @@ -216,7 +195,7 @@ public LookupValuesList getM_HU_PI_Item_Products()

/**
* For the currently selected pip this method loads att
*
*
* @return
*/
@ProcessParamLookupValuesProvider(parameterName = PackingInfoProcessParams.PARAM_M_HU_PI_Item_ID, dependsOn = PackingInfoProcessParams.PARAM_M_HU_PI_Item_Product_ID, numericKey = true, lookupTableName = I_M_HU_PI_Item.Table_Name)
Expand Down Expand Up @@ -248,4 +227,25 @@ protected void postProcess(boolean success)

getViewsRepo().notifyRecordChanged(I_PP_Order.Table_Name, ppOrderLinesView.getPpOrderId().getRepoId());
}

private final IPPOrderReceiptHUProducer newReceiptCandidatesProducer()
{
final PPOrderLineRow row = getSingleSelectedRow();

final PPOrderLineType type = row.getType();
if (type == PPOrderLineType.MainProduct)
{
final PPOrderId ppOrderId = row.getOrderId();
return huPPOrderBL.receivingMainProduct(ppOrderId);
}
else if (type == PPOrderLineType.BOMLine_ByCoProduct)
{
final PPOrderBOMLineId ppOrderBOMLineId = row.getOrderBOMLineId();
return huPPOrderBL.receivingByOrCoProduct(ppOrderBOMLineId);
}
else
{
throw new AdempiereException("Receiving is not allowed");
}
}
}

0 comments on commit 7703e94

Please sign in to comment.