details:   https://code.openbravo.com/erp/devel/pi/rev/e015455f3384
changeset: 33620:e015455f3384
user:      David Miguelez <david.miguelez <at> openbravo.com>
date:      Fri Mar 02 13:22:31 2018 +0100
summary:   Fixes Issue 37925.

When checking the pending quantity while doing a Reservation Consumption,
use the reserved quantity of the Reservation instead of the quantity (which
is the originally requested quantity)

To consume a Reservation, the actual reserved quantity is the amount
that should be used.

diffstat:

 src-db/database/model/functions/M_RESERVATION_CONSUMPTION.xml |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff -r fca95a6558d2 -r e015455f3384 
src-db/database/model/functions/M_RESERVATION_CONSUMPTION.xml
--- a/src-db/database/model/functions/M_RESERVATION_CONSUMPTION.xml     Fri Mar 
02 13:12:05 2018 +0100
+++ b/src-db/database/model/functions/M_RESERVATION_CONSUMPTION.xml     Fri Mar 
02 13:22:31 2018 +0100
@@ -59,7 +59,7 @@
   TYPE RECORD IS REF CURSOR;
   cur_reserved_stock    RECORD;
 BEGIN
-  SELECT r.m_product_id, r.c_uom_id, COALESCE(r.quantity, 0) - 
COALESCE(r.releasedqty, 0),
+  SELECT r.m_product_id, r.c_uom_id, COALESCE(r.reservedqty, 0) - 
COALESCE(r.releasedqty, 0),
       r.m_warehouse_id, r.m_locator_id, r.m_attributesetinstance_id, 
r.res_status
     INTO v_product_id, v_uom_id, v_this_pendingqty, 
       v_dim_warehouse_id, v_dim_locator_id, v_dim_asi_id, v_res_status

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to