Package org.openbravo.model.materialmgmt.onhandquantity

Examples of org.openbravo.model.materialmgmt.onhandquantity.StorageDetail


            final Map<String, BigDecimal> keyUnits = new HashMap<String, BigDecimal>();
            final List<BaseOBObject> delIndex = new ArrayList<BaseOBObject>();
            final Map<String, String> keyStorageId = new HashMap<String, String>();
            int i = 0;
            for (final BaseOBObject b : l1) {
                final StorageDetail sd = (StorageDetail) b;
                final String proId = sd.getProduct().getId();
                final String attSet = sd.getAttributeSetValue().getId();
                final BigDecimal units = sd.getQuantityOnHand();
                final String key = proId + "_" + attSet;

                if (keyUnits.containsKey(key)) {
                    final BigDecimal sum = units.add(keyUnits.get(key));
                    keyUnits.put(key, sum);
                    delIndex.add(b);
                } else {
                    keyStorageId.put(key, sd.getId());
                    keyUnits.put(key, units);
                }
                i++;
            }
View Full Code Here

TOP

Related Classes of org.openbravo.model.materialmgmt.onhandquantity.StorageDetail

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.