Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0029948Openbravo ERP04. Warehouse managementpublic2015-05-20 18:502015-06-03 15:51
maite 
umartirena 
immediatemajoralways
closedunable to reproduce 
5
 
3.0PR15Q3 
umartirena
Core
No
0029948: Wrong landed cost calculation when referencing a negative goods receipt
Wrong landed cost calculation when referencing a negative goods receipt
1. Create new product "costes". Define price=5 for "Tarifa Bebidas Alegres"
2. Register Goods Receipt for Bebidas Alegres. Add line for product "costes" and quantity=6. Process
3. Register Goods Receipt for Bebidas Alegres. Add line for product "costes" and quantity=-2. Process
4. Run "costing background process" and verify that cost is correctly calculated for "costes" product
5. Define Landed Cost Type referencing any account
6. Register Landed Cost document. Create register in Cost tab with amount=2. Access "Receipt" tab and add register selecting your receipt with qty=6 and your receipt with qty=-2 . Process Landed Cost
7. Come back to Product window, Transactions tab and search your negative transaction. Realize that Unit Cost=10 and Total Cost=10.50 when should be Unit Cost=10.50 (5.25*2) and Total Cost=11 (5.25*2+0.5)

Moreover, if you Reactivate your Landed Cost document, Process it again and review new Cost Adjustment it is not 1.50 but 1.48 and not 0.5 but 0.52
No tags attached.
related to defect 00300173.0PR15Q3 closed aferraz Should not be possible to select negative receipts when registering a Landed Cost 
depends on backport 00300053.0PR15Q2.2 closed umartirena Wrong landed cost calculation when referencing a negative goods receipt 
depends on backport 00300063.0PR15Q1.5 closed umartirena Wrong landed cost calculation when referencing a negative goods receipt 
diff 29948.diff (1,038) 2015-06-03 15:50
https://issues.openbravo.com/file_download.php?file_id=8163&type=bug
Issue History
2015-05-20 18:50maiteNew Issue
2015-05-20 18:50maiteAssigned To => Triage Finance
2015-05-20 18:50maiteModules => Core
2015-05-20 18:50maiteTriggers an Emergency Pack => No
2015-05-20 18:51maiteResolution time => 1434751200
2015-05-20 18:51maiteTarget Version => 3.0PR15Q3
2015-05-21 18:28egoitzResolution time1434751200 => 1432332000
2015-05-22 10:22aferrazAssigned ToTriage Finance => aferraz
2015-05-25 18:03eduardo_ArgalAssigned Toaferraz => umartirena
2015-05-25 18:04eduardo_ArgalStatusnew => scheduled
2015-06-03 15:50umartirenaReview Assigned To => umartirena
2015-06-03 15:50umartirenaNote Added: 0078026
2015-06-03 15:50umartirenaStatusscheduled => closed
2015-06-03 15:50umartirenaResolutionopen => unable to reproduce
2015-06-03 15:50umartirenaFile Added: 29948.diff
2015-06-03 15:51umartirenaRelationship addedrelated to 0030017

Notes
(0078026)
umartirena   
2015-06-03 15:50   
The issue has been closed as it is not any more reproducible due to the resolution of issue https://issues.openbravo.com/view.php?id=30017. [^]

Just in case for any reason again happens the same problem find attached a little patch that was implemented at the very beginning of this issue.