Author: lektran
Date: Wed Jan 28 04:37:37 2009
New Revision: 738363
URL:
http://svn.apache.org/viewvc?rev=738363&view=revLog:
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 + "]");
}
}