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();
}
Aggregations