Author: sichen
Date: Thu Mar 8 14:10:07 2007
New Revision: 516193
URL:
http://svn.apache.org/viewvc?view=rev&rev=516193Log:
Fix problem with adding line items to packing session when the item has no weight
Modified:
ofbiz/trunk/applications/product/src/org/ofbiz/shipment/packing/PackingServices.java
Modified: ofbiz/trunk/applications/product/src/org/ofbiz/shipment/packing/PackingServices.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/shipment/packing/PackingServices.java?view=diff&rev=516193&r1=516192&r2=516193==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/shipment/packing/PackingServices.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/shipment/packing/PackingServices.java Thu Mar 8 14:10:07 2007
@@ -53,8 +53,13 @@
quantity = new Double(1);
}
- Debug.log("Pack input [" + productId + "] @ [" + quantity + "]", module);
+ Debug.log("OrderId [" + orderId + "] ship group [" + shipGroupSeqId + "] Pack input [" + productId + "] @ [" + quantity + "] packageSeq [" + packageSeq + "] weight [" + weight +"]", module);
+ if (weight == null) {
+ Debug.logWarning("OrderId [" + orderId + "] ship group [" + shipGroupSeqId + "] product [" + productId + "] being packed without a weight, assuming 0", module);
+ weight = new Double(0.0);
+ }
+
try {
session.addOrIncreaseLine(orderId, null, shipGroupSeqId, productId, quantity.doubleValue(), packageSeq.intValue(), weight.doubleValue(), false);
} catch (GeneralException e) {