svn commit: r738363 - in /ofbiz/trunk/applications/product/src/org/ofbiz/shipment/packing: PackingServices.java PackingSession.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r738363 - in /ofbiz/trunk/applications/product/src/org/ofbiz/shipment/packing: PackingServices.java PackingSession.java

lektran
Author: lektran
Date: Wed Jan 28 04:37:37 2009
New Revision: 738363

URL: http://svn.apache.org/viewvc?rev=738363&view=rev
Log:
Fix issue reported by Josh Murphy in OFBIZ-2145
"Attempt to pack order failed. Double/big decimal issue"
The problem was just an invalid BigDecimal comparison

Modified:
    ofbiz/trunk/applications/product/src/org/ofbiz/shipment/packing/PackingServices.java
    ofbiz/trunk/applications/product/src/org/ofbiz/shipment/packing/PackingSession.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?rev=738363&r1=738362&r2=738363&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/shipment/packing/PackingServices.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/shipment/packing/PackingServices.java Wed Jan 28 04:37:37 2009
@@ -258,7 +258,7 @@
 
         String shipmentId = null;
         try {
-            shipmentId = session.complete(force.booleanValue());
+            shipmentId = session.complete(force);
         } catch (GeneralException e) {
             Debug.logError(e, module);
             return ServiceUtil.returnError(e.getMessage(), e.getMessageList());

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?rev=738363&r1=738362&r2=738363&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/shipment/packing/PackingSession.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/shipment/packing/PackingSession.java Wed Jan 28 04:37:37 2009
@@ -604,7 +604,7 @@
             BigDecimal reservedQty =  this.getCurrentReservedQuantity(line.getOrderId(), line.getOrderItemSeqId(), line.getShipGroupSeqId(), line.getProductId());
             BigDecimal packedQty = this.getPackedQuantity(line.getOrderId(), line.getOrderItemSeqId(), line.getShipGroupSeqId(), line.getProductId());
 
-            if (packedQty != reservedQty) {
+            if (packedQty.compareTo(reservedQty) != 0) {
                 errors.add("Packed amount does not match reserved amount for item (" + line.getProductId() + ") [" + packedQty + " / " + reservedQty + "]");
             }
         }