use of de.metas.handlingunits.hutransaction.IHUTrxBL in project metasfresh-webui-api by metasfresh.
the class WEBUI_Picking_PickQtyToNewHU method createTU.
/**
* Creates a new M_HU within the processe's interited trx.
*
* @param itemProduct
* @param locator
* @return
*/
private static final I_M_HU createTU(@NonNull final I_M_HU_PI_Item_Product itemProduct, @NonNull final I_M_Locator locator) {
final IHandlingUnitsDAO handlingUnitsDAO = Services.get(IHandlingUnitsDAO.class);
final IHUTrxBL huTrxBL = Services.get(IHUTrxBL.class);
final I_M_HU_PI huPI = itemProduct.getM_HU_PI_Item().getM_HU_PI_Version().getM_HU_PI();
return huTrxBL.createHUContextProcessorExecutor().call(huContext -> handlingUnitsDAO.createHUBuilder(huContext).setM_HU_Item_Parent(// no parent
null).setM_HU_PI_Item_Product(itemProduct).setM_Locator(locator).setHUStatus(X_M_HU.HUSTATUS_Active).create(huPI));
}
Aggregations