Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0052553Openbravo ERP04. Warehouse managementpublic2023-05-24 15:222023-06-12 12:51
gorkaion 
radhakrishnan 
highmajoralways
closedfixed 
5
 
PR23Q3 
Core
No
0052553: Missing negative correction adjustment when adjusting a previous transaction
Having a receipt that requires a negative stock adjustment. And that original processing already adjusted it.
When manually adjusting a previous transaction's cost the receipt cost is not updated with a newer adjustment amount so the total cost amount after that transaction is zero.
1. Enable negative correction preference.
2. Create a new product to have a clean transaction list.
3. Set a purchase price of 1EUR and sales price of 2EUR to the new product.
4. Set a cost of 10EUR/unit to the product
5. Create a Sales Order and SHIPMENT of 100 units and process it.
6. If the selected locator does not allow overissue change its status to a one allowing it and process the shipment generating a negative stock.
7. Check it uses the manual cost (10EUR/unit) since it is an outgoing transaction
8. Create a Purchase Order and Receipt of 100 units from the same locator.
9. Note the cost generated by the receipt was 10EUR/unit as the total stock is zero so previous average cost is initially kept.
10. A negative stock adjustmetn is triggered that changes the average cost generated by the receipt to 1EUR/Unit as expected by the purchase price.
11. At this point
- the shipment is valued as 1000EUR
- the receipt is valued as 100 (original cost) + 900EUR (negative stock adjustment)
- total accumulated cost of the product is zero.
- total stock is zero.

UP TO THIS POINT EVERYTHING IS CORRECT.

12. Create a Manual Cost Adjustmetn on the Shipment so the cost is 100EUR (1EUR/unit).
13. Shipment new cost is 100EUR = 1000EUR (original cost) - 900 (manual adjustmetn)
14. Receipt is not adjusted.
15. Total accumulated cost is 900EUR (1000EUR receipt - 100EUR shipment)
16. Total stock is zero.

THIS IS WRONG. The receipt should have a negative stock adjusment done after the manual cost adjustment so the total accumulated cost is ZERO again.
No tags attached.
diff cost-patch.diff (2,781) 2023-06-09 12:54
https://issues.openbravo.com/file_download.php?file_id=18636&type=bug
Issue History
2023-05-24 15:22gorkaionNew Issue
2023-05-24 15:22gorkaionAssigned To => Triage Omni WMS
2023-05-24 15:22gorkaionModules => Core
2023-05-24 15:22gorkaionTriggers an Emergency Pack => No
2023-05-29 14:28vmromanosAssigned ToTriage Omni WMS => Triage Omni OMS
2023-06-09 12:53aferrazAssigned ToTriage Omni OMS => radhakrishnan
2023-06-09 12:54aferrazFile Added: cost-patch.diff
2023-06-12 07:22hgbotNote Added: 0151000
2023-06-12 12:51hgbotResolutionopen => fixed
2023-06-12 12:51hgbotStatusnew => closed
2023-06-12 12:51hgbotFixed in Version => PR23Q3
2023-06-12 12:51hgbotNote Added: 0151055
2023-06-12 12:51hgbotNote Added: 0151056

Notes
(0151000)
hgbot   
2023-06-12 07:22   
Merge Request created: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/909 [^]
(0151055)
hgbot   
2023-06-12 12:51   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/openbravo [^]
Changeset: e2ce6f53314474b0342dce32ab51b61e1e86da69
Author: Radhakrishnan Seeman <radhakrishnan@qualiantech.com>
Date: 12-06-2023 10:24:41
URL: https://gitlab.com/openbravo/product/openbravo/-/commit/e2ce6f53314474b0342dce32ab51b61e1e86da69 [^]

Fixes ISSUE-52553: Missing negative correction adjustment when adjusting a previous transaction

---
M src/org/openbravo/costing/AverageCostAdjustment.java
---
(0151056)
hgbot   
2023-06-12 12:51   
Merge request merged: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/909 [^]