Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0033837Openbravo ERP07. Sales managementpublic2016-08-29 10:332017-12-11 14:02
psanjuan 
markmm82 
urgentminoralways
closedno change required 
20Ubuntu 8.04.1
 
 
vmromanos
Core
No
0033837: Reservation Status info is not correct if an order including a reserved product is closed.
Reservation Status info is not correct if an order including a reserved product is closed.
Make sure that "Enable Stock Reservations" preference is active as "Y".
Log out and log in.

Go to F&B International Client.
Create a new product named "Nuevo Issue" for F&EB España. Select a purchase price list and a sales price list.

Go to purchase order and create a new one for Bebidas Alegres BP. Purchase 10 units of this new item. Book the order.

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.

Create a Sales order, for F&B España, Alimentos BP. Add a product line. Select the product and enter 2 units. Set "Stock Reservation" field as "Automatic".
Book the order.

Go to Reserved Stock tab and check there is already a stock reservation created in there. Navigate to it. Check it shows status complete and Quantity = 2 = Reserved Qty = 2, Released = 0

Check also that both Sales Header and Sales order line shows as reservation status "Completely Reserved".

Create now a goods shipment, and ship two units of the product, from RN-1-0-0. Complete the shipment.

Check that Stock Reservation status has changed to "Closed" as it shows Release qty= 2.

Go to Goods Shipment and void it, by using Close button.

Check that a new Stock Reservation has been created for the order, in status "Completed" with quantity = 2 = Reserved Qty = 2. Released = 0.

Go to the Sales Order and close it.

Check that Sales Order header status changes to "Not Reserved" which is OK, but sales order line "Reservation Status" is still "Complety Reserved" with is NOT OK.

Check stock reservation record and verify new one is in status completed, Quantity = 0, Reserved Qty = 0 and Released = 0


No tags attached.
related to defect 0033838 closed markmm82 Available inventory not correct if an order including a reserved product is closed. 
depends on defect 0033752 closed markmm82 Cannot close an order if the stock was reserved and the associated goods shipment is voided 
related to defect 0035270 closed collazoandy4 Wrong reservation when closing a sales order with a voided partial shipment 
Issue History
2016-08-29 10:33psanjuanNew Issue
2016-08-29 10:33psanjuanAssigned To => Triage Finance
2016-08-29 10:33psanjuanModules => Core
2016-08-29 10:33psanjuanTriggers an Emergency Pack => No
2016-08-29 10:54psanjuanSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=12927#r12927
2016-08-29 11:03psanjuanSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=12928#r12928
2016-08-29 11:16psanjuanSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=12929#r12929
2016-08-29 11:16psanjuanSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=12930#r12930
2016-08-29 11:22psanjuanSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=12931#r12931
2016-08-29 11:23psanjuanSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=12932#r12932
2016-08-29 11:28psanjuanNote Added: 0089486
2016-08-29 11:32psanjuanSummaryAvailable inventory not correct if an order including a reserved product is closed. => Reservation Status info is not correct if an order including a reserved product is closed.
2016-08-29 11:32psanjuanDescription Updatedbug_revision_view_page.php?rev_id=12934#r12934
2016-08-29 11:33psanjuanRelationship addedrelated to 0033838
2016-08-29 11:58psanjuanRelationship addedrelated to 0033752
2016-09-05 10:56psanjuanNote Added: 0089731
2016-09-05 18:21aferrazRelationship deletedrelated to 0033752
2016-09-05 18:22aferrazRelationship addeddepends on 0033752
2016-09-07 18:08aferrazSeveritymajor => minor
2017-03-23 09:33aferrazRelationship addedrelated to 0035270
2017-11-15 18:37ngarciaIssue Monitored: ngarcia
2017-12-04 16:32markmm82Assigned ToTriage Finance => markmm82
2017-12-04 16:32markmm82Statusnew => acknowledged
2017-12-07 16:14markmm82Statusacknowledged => scheduled
2017-12-11 14:02vmromanosReview Assigned To => vmromanos
2017-12-11 14:02vmromanosNote Added: 0100963
2017-12-11 14:02vmromanosStatusscheduled => closed
2017-12-11 14:02vmromanosResolutionopen => no change required

Notes
(0089486)
psanjuan   
2016-08-29 11:28   
Same issue is found if "Stock Reservation" field is left emtpty o it is filled in as "Manual".
(0089731)
psanjuan   
2016-09-05 10:56   
This issue can only be reproduce if the fix of issue 33752 is previously applied, otherwise sales order can not be closed.
(0100963)
vmromanos   
2017-12-11 14:02   
The current behavior is the expected one.
Tested in PI (rev. 03feee46a26b).


When you finally close the sales order both the header and the lines remain in "Not Reserved" status. Probably you missed to refresh the order line.

At the end of the process there are 2 closed reservations linked to the order:
1. The first one with qty = reserved qty = released qty = 2 in close status, which represents the 2 units initially shipped.
2. A new reservation in close status too, with qty = reserved qty = released qty = 0 that represents that this order had a reservation (created when voiding the shipment) but actually no quantity in this order was really released.