Search in sources :

Example 1 with MWMSection

use of org.eevolution.model.MWMSection in project adempiere by adempiere.

the class WMRuleFIFO method getLocator.

/**
	 * Get locator
	 * @param ctx
	 * @param warehouseId
	 * @param productId
	 * @param warehouseAreaTypeId
	 * @param warehouseSectionTypeId
	 * @param trxName
     * @return
     */
public List<MLocator> getLocator(Properties ctx, int warehouseId, int productId, int warehouseAreaTypeId, int warehouseSectionTypeId, String trxName) {
    ArrayList<MLocator> locators = new ArrayList();
    List<MWMArea> areas = MWMArea.getByWarehouse(ctx, warehouseId, trxName);
    for (MWMArea area : areas) {
        List<MWMSection> sections = area.getBySectionType(warehouseSectionTypeId);
        for (MWMSection section : sections) {
            locators.addAll(MWMSectionDetail.getLocatorBySection(section));
        }
    }
    return locators;
}
Also used : MWMArea(org.eevolution.model.MWMArea) MLocator(org.compiere.model.MLocator) ArrayList(java.util.ArrayList) MWMSection(org.eevolution.model.MWMSection)

Aggregations

ArrayList (java.util.ArrayList)1 MLocator (org.compiere.model.MLocator)1 MWMArea (org.eevolution.model.MWMArea)1 MWMSection (org.eevolution.model.MWMSection)1