You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2019/01/15 14:14:14 UTC

svn commit: r1851361 - in /ofbiz/ofbiz-framework/branches/release18.12: ./ applications/product/src/main/java/org/apache/ofbiz/shipment/packing/PackingSession.java

Author: jleroux
Date: Tue Jan 15 14:14:14 2019
New Revision: 1851361

URL: http://svn.apache.org/viewvc?rev=1851361&view=rev
Log:
"Applied fix from trunk for revision: 1851353" 
------------------------------------------------------------------------
r1851353 | paulfoxworthy | 2019-01-15 14:53:51 +0100 (mar. 15 janv. 2019) | 11 lignes

Fixed: In packing, only use reservations with stock on hand
(OFBIZ-9677)

During packing, OFBiz looks for reservations (OrderItemShipGrpInvRes)
for the order item. Some reservations are for back ordered items not on hand.
These reservations should not be used during packing, but they are.

Fixed additional problem in r1850914 when a single reservation has a
quantity that exactly matches the quantity to pack.


------------------------------------------------------------------------

Modified:
    ofbiz/ofbiz-framework/branches/release18.12/   (props changed)
    ofbiz/ofbiz-framework/branches/release18.12/applications/product/src/main/java/org/apache/ofbiz/shipment/packing/PackingSession.java

Propchange: ofbiz/ofbiz-framework/branches/release18.12/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Jan 15 14:14:14 2019
@@ -10,4 +10,4 @@
 /ofbiz/branches/json-integration-refactoring:1634077-1635900
 /ofbiz/branches/multitenant20100310:921280-927264
 /ofbiz/branches/release13.07:1547657
-/ofbiz/ofbiz-framework/trunk:1850015,1850023,1850530,1850647,1850685,1850694,1850711,1850914,1850918,1850921,1850948,1850953,1851006,1851013,1851068,1851074,1851130,1851158,1851200,1851224,1851247,1851254,1851315,1851319,1851350
+/ofbiz/ofbiz-framework/trunk:1850015,1850023,1850530,1850647,1850685,1850694,1850711,1850914,1850918,1850921,1850948,1850953,1851006,1851013,1851068,1851074,1851130,1851158,1851200,1851224,1851247,1851254,1851315,1851319,1851350,1851353

Modified: ofbiz/ofbiz-framework/branches/release18.12/applications/product/src/main/java/org/apache/ofbiz/shipment/packing/PackingSession.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/branches/release18.12/applications/product/src/main/java/org/apache/ofbiz/shipment/packing/PackingSession.java?rev=1851361&r1=1851360&r2=1851361&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/branches/release18.12/applications/product/src/main/java/org/apache/ofbiz/shipment/packing/PackingSession.java (original)
+++ ofbiz/ofbiz-framework/branches/release18.12/applications/product/src/main/java/org/apache/ofbiz/shipment/packing/PackingSession.java Tue Jan 15 14:14:14 2019
@@ -146,7 +146,8 @@ public class PackingSession implements j
             GenericValue res = EntityUtil.getFirst(reservations);
             BigDecimal resQty = numAvailableItems(res);
 
-            if (resQty.compareTo(quantity) > 0) {
+            // If reservation has enough for the quantity required
+            if (resQty.compareTo(quantity) >= 0) {
                 int checkCode = this.checkLineForAdd(res, orderId, orderItemSeqId, shipGroupSeqId, productId, quantity, packageSeqId, update);
                 this.createPackLineItem(checkCode, res, orderId, orderItemSeqId, shipGroupSeqId, productId, quantity, weight, packageSeqId);
             }