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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0033838
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] 07. Sales managementmajoralways2016-08-29 11:322016-09-19 16:27
ReporterpsanjuanView Statuspublic 
Assigned Tomarkmm82 
PriorityurgentResolutionfixedFixed in Version3.0PR16Q4
StatusclosedFix in branchFixed in SCM revision676e26599466
ProjectionnoneETAnoneTarget Version
OSLinux 32 bitDatabasePostgreSQLJava version1.6.0_18
OS VersionProfessional ApplianceDatabase version8.3.9Ant version1.7.1
Product VersionSCM revision 
Review Assigned Toaferraz
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0033838: Available inventory not correct if an order including a reserved product is closed.

DescriptionAvailable inventory not correct if an order including a reserved product is closed.
Steps To ReproduceMake 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 "33838" 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. Leave "Stock Reservation" field empty.

Go to Manage Reservation and press done.

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".

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 the Sales Order and Close it.
Verify that both Sales Header and Sales order line shows as reservation status "Completely Reserved" still.

Go to the Stock Reservation related to the order. It remains the same.
Quantity = Reserved Qty = Released = 2.

Go to Goods Shipment window and void the shipment.

Check a new stock reservation has been created in status completed, but related to the order in status closed, with Quantity = 2 - Reserved Qty= 2, Release = 0. This is not correct.

Create another Sales order. Select the product and enter once again 2 units.
Go to the line and press Manage Reservation button.

Check below info is shown, which is not correct.

Available Qty = 10
Reserved in others = 2
Quantity = 2

As it should be:
Available Qty = 10
Reserved in others = 0
Quantity = 2

Press cancel.


Proposed SolutionA new stock reservation in status "Completed" is created against an order (sales order) in status closed, this order can not be shipped, therefore a remaining reservation is shown there still while it should not be.

Correct information shown should have been:
Available Qty = 10
Reserved in others = 0
Quantity = 2
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to defect 0033837 closedmarkmm82 Reservation Status info is not correct if an order including a reserved product is closed. 
related to defect 0033752 closedmarkmm82 Cannot close an order if the stock was reserved and the associated goods shipment is voided 

-  Notes
(0089900)
markmm82 (developer)
2016-09-12 16:21

Test Plan
- 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.
(0090032)
hgbot (developer)
2016-09-16 09:59

Repository: erp/devel/pi
Changeset: 676e265994661b17ddd4fcd452b71d8443659aa5
Author: Mark <markmm82 <at> gmail.com>
Date: Thu Sep 15 12:14:10 2016 -0400
URL: http://code.openbravo.com/erp/devel/pi/rev/676e265994661b17ddd4fcd452b71d8443659aa5 [^]

Fixes issue 33838: Correct Stock Reservation when created from a closed order

When voiding a shipment related to a reserved order, if order is closed, new reservation will not be created (in case order was fully shipped) and existing reservation will not be updated (in case order was partially shipped).
Besides, when closing an order, related reservation will be also closed.

---
M src-db/database/model/functions/C_ORDER_POST1.xml
M src-db/database/model/functions/M_INOUT_POST.xml
---
(0090034)
aferraz (manager)
2016-09-16 10:02

Code review + Testing OK
(0090073)
hudsonbot (developer)
2016-09-19 16:27

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/17da7ad0ad62 [^]
Maturity status: Test

- Issue History
Date Modified Username Field Change
2016-08-29 11:32 psanjuan New Issue
2016-08-29 11:32 psanjuan Assigned To => Triage Finance
2016-08-29 11:32 psanjuan Modules => Core
2016-08-29 11:32 psanjuan Triggers an Emergency Pack => No
2016-08-29 11:33 psanjuan Relationship added related to 0033837
2016-08-29 11:38 psanjuan Summary tbd => Available inventory not correct if an order including a reserved product is closed.
2016-08-29 11:38 psanjuan Description Updated View Revisions
2016-08-29 11:38 psanjuan Steps to Reproduce Updated View Revisions
2016-08-29 11:41 psanjuan Note Added: 0089489
2016-08-29 11:41 psanjuan Steps to Reproduce Updated View Revisions
2016-08-29 11:51 psanjuan Steps to Reproduce Updated View Revisions
2016-08-29 11:51 psanjuan Proposed Solution updated
2016-08-29 11:54 psanjuan Note Edited: 0089489 View Revisions
2016-08-29 11:57 psanjuan Note Edited: 0089489 View Revisions
2016-08-29 11:58 psanjuan Relationship added blocks 0033752
2016-08-29 13:36 psanjuan Steps to Reproduce Updated View Revisions
2016-08-29 14:14 psanjuan Proposed Solution updated
2016-08-29 15:07 psanjuan Note Edited: 0089489 View Revisions
2016-08-29 15:07 psanjuan Relationship added related to 0033842
2016-09-05 10:54 psanjuan Steps to Reproduce Updated View Revisions
2016-09-05 10:57 psanjuan Steps to Reproduce Updated View Revisions
2016-09-05 11:19 psanjuan Proposed Solution updated
2016-09-05 11:21 psanjuan Note Deleted: 0089489
2016-09-05 18:05 aferraz Relationship deleted blocks 0033752
2016-09-05 18:05 aferraz Relationship added related to 0033752
2016-09-06 16:59 markmm82 Status new => scheduled
2016-09-06 16:59 markmm82 Assigned To Triage Finance => markmm82
2016-09-07 17:49 ngarcia Resolution time => 1475013600
2016-09-12 16:21 markmm82 Note Added: 0089900
2016-09-16 09:59 hgbot Checkin
2016-09-16 09:59 hgbot Note Added: 0090032
2016-09-16 09:59 hgbot Status scheduled => resolved
2016-09-16 09:59 hgbot Resolution open => fixed
2016-09-16 09:59 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/676e265994661b17ddd4fcd452b71d8443659aa5 [^]
2016-09-16 10:02 aferraz Review Assigned To => aferraz
2016-09-16 10:02 aferraz Note Added: 0090034
2016-09-16 10:02 aferraz Status resolved => closed
2016-09-16 10:02 aferraz Fixed in Version => 3.0PR16Q4
2016-09-19 16:27 hudsonbot Checkin
2016-09-19 16:27 hudsonbot Note Added: 0090073


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker