Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0038799
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] 07. Sales managementmajoralways2018-06-21 10:112019-03-31 17:04
ReportergorkaionView Statuspublic 
Assigned ToAtulOpenbravo 
PriorityurgentResolutionfixedFixed in Version3.0PR18Q4
StatusclosedFix in branchFixed in SCM revisiondc3d9d26aeb4
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Todmiguelez
Web browser
ModulesCore
Regression levelProduction - Confirmed Stable
Regression date2017-05-23
Regression introduced in release3.0PR17Q3
Regression introduced by commithttps://code.openbravo.com/erp/devel/pi/rev/0e29b93a2d41205b1309cd6fde9f86cabbb47e91 [^]
Triggers an Emergency PackNo
Summary

0038799: More quantity reserved than available after booking a reopened sales order with more ordered quantity

DescriptionIn 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.
Steps To Reproduce- 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.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
depends on backport 00389583.0PR18Q3 closedAtulOpenbravo More quantity reserved than available after booking a reopened sales order with more ordered quantity 
depends on backport 00389593.0PR18Q2.2 closedAtulOpenbravo More quantity reserved than available after booking a reopened sales order with more ordered quantity 
caused by defect 0035958 closedcollazoandy4 Reactivating a sales order and decreasing the ordered quantity that is already reserved causes wrong reservation 

-  Notes
(0105718)
AtulOpenbravo (developer)
2018-07-13 08:21

Test Plan: 33838
- Active ""Enable Stock Reservations"" preference"".
- Log out and log in.
Go to F&B International Client.
1. Create a new product named ""33838"" for F&EB España. Select a purchase price list and a sales price list.
2. Go to purchase order and create a new one for Bebidas Alegres BP. Purchase 10 units of this new item. Book the order.
3. Create a Goods Receipt and receipt those 10 units in España Region Norte Wh, position RN-1-0-0 for instance. Complete the receipt.
4. Create a Sales order, for F&B España, Alimentos BP. Add a product line. Select the product and enter 2 units. Leave ""Stock Reservation"" field empty.
5. Go to Manage Reservation and press done.
6. Go to Reserved Stock and check a new record has been created for this order with below info:
     Quantity = Reserved Qty = 2, Released = 0
   Check also that both Sales Header and Sales order line shows as reservation status ""Completely Reserved"".
7. Create now a goods shipment, and ship two units of the product, from RN-1-0-0. Complete the shipment.
8. Check that Stock Reservation status has changed to ""Closed"" as it shows Release qty= 2.
9. Go to the Sales Order and Close it.
   Verify that both Sales Header and Sales order line shows as reservation status ""Not Reserved"".
   Go to the Stock Reservation related to the order. It remains the same.
     Quantity = Reserved Qty = Released = 2.
10. Go to Goods Shipment window and void the shipment.
11. Check that no new stock reservation has been created.
12. Create another Sales order. Select the product and enter once again 2 units.
13. Go to the line and press Manage Reservation button.
14. Check below info is shown, which is correct.
     Available Qty = 10
     Reserved in others = 0
     Quantity = 2
15. Press cancel.
(0105719)
AtulOpenbravo (developer)
2018-07-13 08:21

Test Plan: 35270 I

Create a new Sales Order:
     Business Partner: Alimentos y Supermercados, S.A
     Go to Lines tab and create a new Record:
       Product: Vino Blanco 0,75L
       Ordered Quantity: 10
     Clic on Book button
     Select the created line and Click on Manage Reservation and reserve the 10 units
   Create a new Goods Shipment:
     Business Partner: Alimentos y Supermercados, S.A
     Clic on Create Lines From button
       Select the created order
       Warehouse position: Rn-0-0-0
       Select the order line
       Clic on OK button
     Edit the created line Movement Quantity to 6
     Clic on Complete button
   Create a new Goods Shipment:
     Business Partner: Alimentos y Supermercados, S.A
     Clic on Create Lines From button
       Select the created order
       Warehouse position: Rn-0-0-0
       Select the order line
       Clic on OK button
     Clic on Complete button
   Check in Stock Reservation window that the created reservation it's closed and quantity/reserved qty/released = 10
   Void the previous shipment created
   Close the order
   Go to Stock Reservation window and check:
     Manage Stock button doesn't show in closed reservation
     Exist two reservations associated to the order first with quantity/reserved qty/released = 10 and second with quantity = 6, reserved qty/released = 0
(0105720)
AtulOpenbravo (developer)
2018-07-13 08:22

Test Plan : 35270 II

Go to Product and create a new Record:
     Search Key / Name: Issue 35270
     Go to Price and create a new Record:
       Price List Version: Tarifa de ventas
       Unit Price: 8
   Go to Goods Receipt window and create a new Record:
     Business Partner: Bebidas Alegres, S.L.
     Go to Lines tab and create a new Record:
       Product: Issue 35270
       Movement Quantity: 100
     Complete the receipt
   Create a new Sales Order:
     Business Partner: Alimentos y Supermercados, S.A
     Go to Lines tab and create a new Record:
       Product: Issue 35270
       Ordered Quantity: 10
     Clic on Book button
     Select the created line and Click on Manage Reservation and reserve the 10 units
   Check in Stock Reservation: quantity = 10, reserved quantity = 10, released quantity = 0, status = CO.
   Go to Stock tab of Product window and check: quantity on hand = 100, reserved quantity = 10.
   Create a new Goods Shipment:
     Business Partner: Alimentos y Supermercados, S.A
     Clic on Create Lines From button
       Select the created order
       Warehouse position: Rn-0-0-0
       Select the order line
       Clic on OK button
     Edit the created line Movement Quantity to 6
     Clic on Complete button
   Check in Stock Reservation: quantity = 10, reserved quantity = 10, released quantity = 6, status = CO.
   Go to Stock tab of Product window and check: quantity on hand = 94, reserved quantity = 4.
   Create a new Goods Shipment:
     Business Partner: Alimentos y Supermercados, S.A
     Clic on Create Lines From button
       Select the created order
       Warehouse position: Rn-0-0-0
       Select the order line
       Clic on OK button
     Clic on Complete button
   Check in Stock Reservation window the created reservation it's closed and quantity/reserved qty/released = 10
   Go to Stock tab of Product window and check: quantity on hand = 90, reserved quantity = 0.
   Void the previous shipment created
   Check in Stock Reservation window that a new reservation was created with status = completed, quantity = 10, reserved qty = 4, released = 0
   Go to Stock tab of Product window and check: quantity on hand = 94, reserved quantity = 4.
   Create a new Goods Shipment:
     Business Partner: Alimentos y Supermercados, S.A
     Clic on Create Lines From button
       Select the created order
       Warehouse position: Rn-0-0-0
       Select the order line
       Clic on OK button
     Edit the created line Movement Quantity to 1
     Clic on Complete button
    Check in Stock Reservation window the previous created reservation released qty was updated to 1
    Go to Stock tab of Product window and check: quantity on hand = 93, reserved quantity = 3.
    Close the order
    Check Sales Order: ordered quantity = 7, delivered quantity = 7.
    Check in Stock Reservation window:
      Stock Reservation 1: quantity = 10, reserved quantity = 10, released quantity = 10, status = CL.
      Stock Reservation 2: quantity = 7, reserved quantity = 1, released quantity = 1, status = CL.
    Go to Stock tab of Product window and check: quantity on hand = 93, reserved quantity = 0.
(0105721)
AtulOpenbravo (developer)
2018-07-13 08:22

Test Plan: 35270 III

Create a new Sales Order:
     Business Partner: Alimentos y Supermercados, S.A
     Go to Lines tab and create a new Record:
       Product: Vino Blanco 0,75L
       Ordered Quantity: 10
     Clic on Book button
     Select the created line and Click on Manage Reservation and reserve the 10 units
   Go to Goods Shipment window and create a new record:
     Business Partner: Alimentos y Supermercados, S.A
     Clic on Create Lines From button
       Select the created order
       Warehouse position: Rn-0-0-0
       Select the order line
       Clic on OK button
     Edit the created line Movement Quantity to 1
     Click on Complete button
   Check in Stock Reservation window the reservation asociated to the order it's completed with quantity = 10, reserved qty = 10, released = 1
   Close the previous order created
   Check in Stock Reservation window that the previous reservation it's close with quantity/reserved qty/released = 1
(0105722)
AtulOpenbravo (developer)
2018-07-13 08:23

Test Plan: 35270 IV

Create a new Sales Order window:
     Business Partner: Alimentos y Supermercados, S.A
     Go to Lines tab and create a new Record:
       Product: Vino Blanco 0,75L
       Ordered Quantity: 10
     Clic on Book button
     Select the created line and Click on Manage Reservation and reserve the 10 units
  Check in Stock Reservation window that the reservation asociated to the order have quantity = reserved qty = 10, released qty = 0
  Close the order
  Check in Stock Reservation window that the reservation asociated to the order have quantity/reserved qty/released = 0
(0105723)
AtulOpenbravo (developer)
2018-07-13 08:23

Test Plan: 35958

Go to Sales Order window and create a new record:
     Business Partner: Alimentos y Supermercados, S.A
     Create a new record in Lines tab:
       Product: Zumo de Piña 0,5L
       Ordered Quantity: 15
       Stock Reservation: Automatic
     Complete the order
   Go to Stock reservation window and check that a new reservation has been created:
     Product: Zumo de Piña 0,5L
     Quantity / Reserved Qty: 15
     Released: 0
     Status: Completed
     Stock line with:
       Quantity: 15
       Released: 0
   Reactivate the previous order created and change the ordered quantity to 10 and complete it
   Check the reservation has been updated to:
      Quantity / Reserved Qty: 10
      Released: 0
      Status: Completed
      Stock line with:
       Quantity: 10
       Released: 0
   Reactivate the order, change the ordered quantity to 5 and complete it
   Check the reservation has been updated to:
      Quantity / Reserved Qty: 5
      Released: 0
      Status: Completed
      Stock line with:
       Quantity: 5
       Released: 0
   Click on Manage Reservation and reserve 3 units
   Check the reservation has been updated to:
      Quantity: 5
      Reserved Qty: 3
      Status: Completed
      Stock line with:
       Quantity: 3
       Released: 0
   Reactivate the previous order created and change the ordered quantity to 1 and complete it
   Check the reservation has been updated to:
      Quantity / Reserved Qty: 1
      Released: 0
      Status: Completed
      Stock line with:
       Quantity: 1
       Released: 0
   Reactivate the previous order created and change the ordered quantity to 15 and complete it
   Check the reservation has been updated to:
      Quantity / Reserved Qty: 15
      Released: 0
      Status: Completed
      Stock line with:
       Quantity: 15
       Released: 0
   Go to Goods Shipment window and create a new record:
     Business Partner: Alimentos y Supermercados, S.A
     Clic on Create Lines From button and select the previous order created
       Edit the line movement quantity to 5
     Complete the Shipment
   Check the reservation has been updated to:
      Quantity / Reserved Qty: 15
      Released: 5
      Status: Completed
      Stock line with:
       Quantity: 15
       Released: 5
   Reactivate the previous order created and change the ordered quantity to 3
   Check the error "Saving failed. Cannot modify an order line that has deliveries or invoices" is shown when saving the line
   Cancel the edit and complete the order
   Close the order and check the reservation has been updated to:
      Quantity / Reserved Qty / Released: 5
      Status: Closed
      Stock line with:
       Quantity: 5
       Released: 5
(0105724)
AtulOpenbravo (developer)
2018-07-13 08:52

Test Plan 38799
- 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 20 units reserved and 20 are available.
(0105788)
dmiguelez (developer)
2018-07-19 10:24

Test Plan 37925
As System Admin role:
   Set Is Quantity Variable field displayed in Product window

As group admin role:
   Set 'Enable Stock Reservations' preference to Y
   Apply module's dataset
   Log out and log in

   Create a new product
   Set it as Is Quantity Variable
   Add a sales price to it

   Create a Goods Receipt, add 10 units of the product and complete it
   Create a Sales Order, add 6 units of the product and book it
   Generate Picking List:
      Direct Picking List to Customer
   Go to Warehouse Picking List window, edit the line and set 10 units in Movement Quantity field
   Try to process the picking list and check no error is shown and the process ends successfully.
(0105790)
hgbot (developer)
2018-07-19 10:46

Repository: erp/devel/pi
Changeset: dc3d9d26aeb499470f41f011bc44c1d840187733
Author: Atul Gaware <atul.gaware <at> openbravo.com>
Date: Fri Jul 13 11:57:27 2018 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/dc3d9d26aeb499470f41f011bc44c1d840187733 [^]

Fixes Issue 38799: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
---
(0105795)
dmiguelez (developer)
2018-07-19 10:49

Code Review + Testing Ok
(0106213)
hudsonbot (developer)
2018-08-08 13:06

A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/bfd7a414183a [^]
Maturity status: Test
(0110934)
hgbot (developer)
2019-03-31 17:04

Repository: tools/automation/int
Changeset: 906e340dfbddf3571a5ffc010df31d7ebef38db5
Author: Atul Gaware <atul.gaware <at> openbravo.com>
Date: Tue Feb 12 01:42:55 2019 +0530
URL: http://code.openbravo.com/tools/automation/int/rev/906e340dfbddf3571a5ffc010df31d7ebef38db5 [^]

Related To Issue 38799:Automated test added for reservation regression

---
M src-test/com/openbravo/test/integration/erp/gui/masterdata/product/ProductTab.java
M src-test/com/openbravo/test/integration/erp/gui/masterdata/product/ProductWindow.java
M src-test/com/openbravo/test/integration/erp/gui/masterdata/product/classic/ProductWindow.java
M src-test/com/openbravo/test/integration/erp/modules/functionalteam/reservation/testsuites/RES_Regressions/RES_Regressions1/RES_RegressionSuite1.java
M src-test/com/openbravo/test/integration/erp/modules/functionalteam/reservation/testsuites/RES_Regressions/RES_Regressions1/build.xml
M src-test/com/openbravo/test/integration/erp/testscripts/masterdata/product/Product.java
M src-test/com/openbravo/test/integration/erp/testscripts/masterdata/product/ProductScript.java
A src-test/com/openbravo/test/integration/erp/data/masterdata/product/ProductStockData.java
A src-test/com/openbravo/test/integration/erp/data/masterdata/product/ProductStockData.xml
A src-test/com/openbravo/test/integration/erp/gui/masterdata/product/ProductStockTab.java
A src-test/com/openbravo/test/integration/erp/gui/masterdata/product/classic/ProductStockTab.java
A src-test/com/openbravo/test/integration/erp/modules/functionalteam/reservation/testsuites/RES_Regressions/RES_Regressions1/RESRegression38799.java
A src-test/com/openbravo/test/integration/erp/testscripts/masterdata/product/ProductStockScript.java
---

- Issue History
Date Modified Username Field Change
2018-06-21 10:11 gorkaion New Issue
2018-06-21 10:11 gorkaion Assigned To => Triage Finance
2018-06-21 10:11 gorkaion Modules => Core
2018-06-21 10:11 gorkaion Resolution time => 1531346400
2018-06-21 10:11 gorkaion Triggers an Emergency Pack => No
2018-06-22 08:47 Sandrahuguet Assigned To Triage Finance => AtulOpenbravo
2018-06-28 09:31 AtulOpenbravo Status new => scheduled
2018-07-13 08:21 AtulOpenbravo Note Added: 0105718
2018-07-13 08:21 AtulOpenbravo Note Added: 0105719
2018-07-13 08:22 AtulOpenbravo Note Added: 0105720
2018-07-13 08:22 AtulOpenbravo Note Added: 0105721
2018-07-13 08:23 AtulOpenbravo Note Added: 0105722
2018-07-13 08:23 AtulOpenbravo Note Added: 0105723
2018-07-13 08:52 AtulOpenbravo Note Added: 0105724
2018-07-13 14:11 Sandrahuguet Regression level => Production - Confirmed Stable
2018-07-13 14:11 Sandrahuguet Regression introduced in release => 3.0PR17Q3
2018-07-13 14:14 Sandrahuguet Regression date => 2017-05-23
2018-07-13 14:14 Sandrahuguet Regression introduced by commit => https://code.openbravo.com/erp/devel/pi/rev/0e29b93a2d41205b1309cd6fde9f86cabbb47e91 [^]
2018-07-13 14:14 Sandrahuguet Status scheduled => acknowledged
2018-07-13 14:14 Sandrahuguet Status acknowledged => scheduled
2018-07-14 12:26 dmitry_mezentsev Relationship added caused by 0035958
2018-07-16 10:21 Practics Issue Monitored: Practics
2018-07-19 10:24 dmiguelez Note Added: 0105788
2018-07-19 10:46 hgbot Checkin
2018-07-19 10:46 hgbot Note Added: 0105790
2018-07-19 10:46 hgbot Status scheduled => resolved
2018-07-19 10:46 hgbot Resolution open => fixed
2018-07-19 10:46 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/dc3d9d26aeb499470f41f011bc44c1d840187733 [^]
2018-07-19 10:49 dmiguelez Review Assigned To => dmiguelez
2018-07-19 10:49 dmiguelez Note Added: 0105795
2018-07-19 10:49 dmiguelez Status resolved => closed
2018-07-19 10:49 dmiguelez Fixed in Version => 3.0PR18Q4
2018-08-08 13:06 hudsonbot Checkin
2018-08-08 13:06 hudsonbot Note Added: 0106213
2019-03-31 17:04 hgbot Checkin
2019-03-31 17:04 hgbot Note Added: 0110934


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker