Author: lektran
Date: Sat Jun 23 16:57:48 2007
New Revision: 550142

URL: http://svn.apache.org/viewvc?view=rev&rev=550142
Log:
Manually applied fix from trunk for revision: 550138

Modified:
    
ofbiz/branches/release4.0/applications/product/src/org/ofbiz/shipment/packing/PackingSession.java

Modified: 
ofbiz/branches/release4.0/applications/product/src/org/ofbiz/shipment/packing/PackingSession.java
URL: 
http://svn.apache.org/viewvc/ofbiz/branches/release4.0/applications/product/src/org/ofbiz/shipment/packing/PackingSession.java?view=diff&rev=550142&r1=550141&r2=550142
==============================================================================
--- 
ofbiz/branches/release4.0/applications/product/src/org/ofbiz/shipment/packing/PackingSession.java
 (original)
+++ 
ofbiz/branches/release4.0/applications/product/src/org/ofbiz/shipment/packing/PackingSession.java
 Sat Jun 23 16:57:48 2007
@@ -141,9 +141,11 @@
             while (i.hasNext() && qtyRemain > 0) {
                 GenericValue res = (GenericValue) i.next();
                 double resQty = res.getDouble("quantity").doubleValue();
-                PackingSessionLine line = this.findLine(orderId, 
orderItemSeqId, shipGroupSeqId, res.getString("inventoryItemId"), packageSeqId);
-                if (UtilValidate.isNotEmpty(line) && !update) {
-                    resQty -= line.getQuantity();
+                double resPackedQty = this.getPackedQuantity(orderId, 
orderItemSeqId, shipGroupSeqId, res.getString("inventoryItemId"), -1);
+                if (resPackedQty >= resQty) {
+                    continue;
+                } else if (!update) {
+                    resQty -= resPackedQty;
                 }
 
                 double thisQty = resQty > qtyRemain ? qtyRemain : resQty;


Reply via email to