Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0038958Openbravo ERP07. Sales managementpublic2018-06-21 10:112018-07-19 10:47
gorkaion 
AtulOpenbravo 
urgentmajoralways
closedfixed 
5
 
3.0PR18Q33.0PR18Q3 
dmiguelez
Core
Production - Confirmed Stable
2017-05-23
3.0PR17Q3
https://code.openbravo.com/erp/devel/pi/rev/0e29b93a2d41205b1309cd6fde9f86cabbb47e91 [^]
No
0038958: More quantity reserved than available after booking a reopened sales order with more ordered quantity
In case a reserved sales order is reopened to increase the ordered quantity. When it is booked again the reservation is updated to reserve the new quantity not checking if there is enough available.
- Ensure the reservations are enabled with "enable stock reservations" preference.
- Create a new product and set a sales price.
- Create and process a physical inventory to initialize 20 units.
- Create a sales order for the product of 10 units and reserve it.
- Create a new sales order for the product of 10 units and reserve it.
- Check the stock tab in the product screen that there are 20 units available and all of them reserved.
- Reactivate and book the second sales order increasing the ordered quantity to 20.
- Check again the stock tab, there are 30 units reserved although only 20 are available.
No tags attached.
blocks defect 0038799 closed AtulOpenbravo More quantity reserved than available after booking a reopened sales order with more ordered quantity 
Issue History
2018-07-13 14:14SandrahuguetTypedefect => backport
2018-07-13 14:14SandrahuguetTarget Version => 3.0PR18Q3
2018-07-19 10:46hgbotCheckin
2018-07-19 10:46hgbotNote Added: 0105791
2018-07-19 10:46hgbotStatusscheduled => resolved
2018-07-19 10:46hgbotResolutionopen => fixed
2018-07-19 10:46hgbotFixed in SCM revision => http://code.openbravo.com/erp/backports/3.0PR18Q3/rev/5851f06c26bee00242d007d67de63aad81790248 [^]
2018-07-19 10:47dmiguelezReview Assigned To => dmiguelez
2018-07-19 10:47dmiguelezNote Added: 0105794
2018-07-19 10:47dmiguelezStatusresolved => closed
2018-07-19 10:47dmiguelezFixed in Version => 3.0PR18Q3

Notes
(0105791)
hgbot   
2018-07-19 10:46   
Repository: erp/backports/3.0PR18Q3
Changeset: 5851f06c26bee00242d007d67de63aad81790248
Author: Atul Gaware <atul.gaware <at> openbravo.com>
Date: Fri Jul 13 11:57:27 2018 +0530
URL: http://code.openbravo.com/erp/backports/3.0PR18Q3/rev/5851f06c26bee00242d007d67de63aad81790248 [^]

Fixes Issue 38958:More quantity reserved than available after booking
 a reopened sales order with more ordered quantity

** When ordered qty is greater than already reserved quantity
then v_pendingtounreserve needs to be considered as ZERO instead
of negative value as it exceeds the reserved qty than the available
qty.

---
M src-db/database/model/functions/C_ORDER_POST1.xml
---
(0105794)
dmiguelez   
2018-07-19 10:47   
Code Review + Testing Ok