Author: jaz
Date: Sun Apr 22 22:59:18 2007
New Revision: 531342
URL:
http://svn.apache.org/viewvc?view=rev&rev=531342Log:
fixed bug in packing code which was ignoring backorders
Modified:
ofbiz/trunk/applications/product/src/org/ofbiz/shipment/packing/PackingSession.java
Modified: ofbiz/trunk/applications/product/src/org/ofbiz/shipment/packing/PackingSession.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/shipment/packing/PackingSession.java?view=diff&rev=531342&r1=531341&r2=531342==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/shipment/packing/PackingSession.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/shipment/packing/PackingSession.java Sun Apr 22 22:59:18 2007
@@ -396,9 +396,11 @@
Iterator i = res.iterator();
while (i.hasNext()) {
GenericValue v = (GenericValue) i.next();
+ Double not = v.getDouble("quantityNotAvailable");
Double qty = v.getDouble("quantity");
+ if (not == null) not = new Double(0);
if (qty == null) qty = new Double(0);
- reserved += qty.doubleValue();
+ reserved += (qty.doubleValue() - not.doubleValue());
}
}