Search in sources :

Example 1 with IHUPickingSlotBL

use of de.metas.handlingunits.picking.IHUPickingSlotBL in project metasfresh-webui-api by metasfresh.

the class WEBUI_Picking_With_M_Source_HU_Base method checkSourceHuPrecondition.

protected final boolean checkSourceHuPrecondition() {
    final I_M_ShipmentSchedule shipmentSchedule = getView().getCurrentShipmentSchedule();
    final PickingHUsQuery query = PickingHUsQuery.builder().onlyIfAttributesMatchWithShipmentSchedules(true).shipmentSchedules(ImmutableList.of(shipmentSchedule)).onlyTopLevelHUs(true).build();
    final IHUPickingSlotBL huPickingSlotBL = Services.get(IHUPickingSlotBL.class);
    final List<I_M_HU> sourceHUs = huPickingSlotBL.retrieveAvailableSourceHUs(query);
    return !sourceHUs.isEmpty();
}
Also used : IHUPickingSlotBL(de.metas.handlingunits.picking.IHUPickingSlotBL) I_M_HU(de.metas.handlingunits.model.I_M_HU) I_M_ShipmentSchedule(de.metas.inoutcandidate.model.I_M_ShipmentSchedule) PickingHUsQuery(de.metas.handlingunits.picking.IHUPickingSlotBL.PickingHUsQuery)

Aggregations

I_M_HU (de.metas.handlingunits.model.I_M_HU)1 IHUPickingSlotBL (de.metas.handlingunits.picking.IHUPickingSlotBL)1 PickingHUsQuery (de.metas.handlingunits.picking.IHUPickingSlotBL.PickingHUsQuery)1 I_M_ShipmentSchedule (de.metas.inoutcandidate.model.I_M_ShipmentSchedule)1