Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0033302Openbravo ERP04. Warehouse managementpublic2016-06-17 13:092016-06-22 18:10
psanjuan 
Sanjota 
urgentmajoralways
closedfixed 
30Professional Appliance
 
3.0PR16Q3 
aferraz
Core
No
0033302: Costing engine is not taking into account that purchase price list can be setup to include taxes.
Costing engine is not taking into account that purchase price list can be setup to include taxes, while cost should not include taxes anyway.
Go to Price list window and create a new one for F&B España, named: Purchase Price List Including Taxes. Set it up as "Price Including Taxes". Enter a price list version valid from 01-01-2016.

Go to Product window and create a new product, named: Product Issue 33302.

Go to Price tab and select just created purchase price list including taxes.
Enter a price = 121.00 (this price includes a 21.00 of taxes (21%)

Go to Business Partner window, search by Bebidas Alegres BP. Go to Vendor sub-tab and assign just created price list including taxes in there, field: "Purchase Pricelist"

Go to Goods Receipt and create a new one for F&B España, Bebidas Alegres BP, for 1 unit of the product just created. Complete.

Run Costing Background process.

Go to product window, search by the product and check that the cost shown in "Costing" tab is 121.00.

Above is not correct because cost should not include taxes. Correct Cost should have been 100.00
When calling to FinancialUtils.getProductPrice method from CostingAlgorithm.getPriceListCost, CostingAlgorithm.getReceiptDefaultCost or CostingUtils.getDefaultCost methods we need to "exclude" purchase price lists including taxes.
No tags attached.
related to defect 00339683.0PR17Q1 closed dmiguelez Wrong costs calculated with Backdated Transactions 
Issue History
2016-06-17 13:09psanjuanNew Issue
2016-06-17 13:09psanjuanAssigned To => Triage Finance
2016-06-17 13:09psanjuanModules => Core
2016-06-17 13:09psanjuanTriggers an Emergency Pack => No
2016-06-17 13:18psanjuanSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=12417#r12417
2016-06-17 13:21psanjuanSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=12418#r12418
2016-06-17 13:32psanjuanSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=12419#r12419
2016-06-17 13:34psanjuanSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=12420#r12420
2016-06-17 13:36psanjuanProposed Solution updated
2016-06-17 13:48aferrazProposed Solution updated
2016-06-20 11:02SanjotaStatusnew => scheduled
2016-06-20 13:14aferrazProposed Solution updated
2016-06-20 13:14aferrazAssigned ToTriage Finance => Sanjota
2016-06-20 17:26SanjotaNote Added: 0087684
2016-06-21 11:34aferrazProposed Solution updated
2016-06-21 12:06hgbotCheckin
2016-06-21 12:06hgbotNote Added: 0087716
2016-06-21 12:06hgbotStatusscheduled => resolved
2016-06-21 12:06hgbotResolutionopen => fixed
2016-06-21 12:06hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/a6bc455313684af22bab91f4d8420b41b54e2c66 [^]
2016-06-21 12:06hgbotCheckin
2016-06-21 12:06hgbotNote Added: 0087717
2016-06-21 12:07aferrazReview Assigned To => aferraz
2016-06-21 12:07aferrazNote Added: 0087718
2016-06-21 12:07aferrazStatusresolved => closed
2016-06-21 12:07aferrazFixed in Version => 3.0PR16Q3
2016-06-21 12:51psanjuanSummaryCosting engine is not taken into account that purchase price list can be setup to include taxes. => Costing engine is not taking into account that purchase price list can be setup to include taxes.
2016-06-21 12:51psanjuanDescription Updatedbug_revision_view_page.php?rev_id=12442#r12442
2016-06-22 18:10hudsonbotCheckin
2016-06-22 18:10hudsonbotNote Added: 0087828
2016-06-22 18:10hudsonbotCheckin
2016-06-22 18:10hudsonbotNote Added: 0087829
2016-09-19 10:12aferrazRelationship addedrelated to 0033968

Notes
(0087684)
Sanjota   
2016-06-20 17:26   
Test plan:
Go to Price list window and create a new one for F&B España, named: Purchase Price List Including Taxes. Set it up as "Price Including Taxes". Enter a price list version valid from 01-01-2016.

Go to Product window and create a new product, named: Product Issue 33302.

Go to Price tab and select just created purchase price list including taxes.
Enter a price = 121.00 (this price includes a 21.00 of taxes (21%)

Go to Business Partner window, search by Bebidas Alegres BP. Go to Vendor sub-tab and assign just created price list including taxes in there, field: "Purchase Pricelist"

Go to Goods Receipt and create a new one for F&B España, Bebidas Alegres BP, for 1 unit of the product just created. Complete.

Run Costing Background process.

Check the process log in process monitor for the process scheduled
and you can see the error No Price List or Standard Cost found for given product. Org: F&B España, S.A, Product: <product details>
also
Go to product window, search by the product and check the cost tab and there won't be any record created.
Which tells that the purchase pricelist with tax included are excluded in costing.
(0087716)
hgbot   
2016-06-21 12:06   
Repository: erp/devel/pi
Changeset: a6bc455313684af22bab91f4d8420b41b54e2c66
Author: Sanjota <sanjota.nelagi <at> promantia.com>
Date: Tue Jun 21 02:37:36 2016 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/a6bc455313684af22bab91f4d8420b41b54e2c66 [^]

Fixes issue 33302: Related to costing of purchase price lists including taxes

Fix to the issue Costing engine is not taken into account that purchase price list can be setup to include taxes, while cost should not include taxes.

---
M src/org/openbravo/costing/CostingAlgorithm.java
M src/org/openbravo/costing/CostingUtils.java
M src/org/openbravo/financial/FinancialUtils.java
---
(0087717)
hgbot   
2016-06-21 12:06   
Repository: erp/devel/pi
Changeset: 49000d1b62921c2b18c6984d314ec2744ae14c2a
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Tue Jun 21 11:48:41 2016 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/49000d1b62921c2b18c6984d314ec2744ae14c2a [^]

Related to issue 33302: Code review improvements

- Add new usePriceIncludeTax parameter to getProductPrice method documentation.
- Check usePriceIncludeTax flag only once in getProductPrice query.
- Send usePriceIncludeTax parameter correctly in CostingAlgorithm.getPriceListCost method.
- Send usePriceIncludeTax parameter in CostingAlgorithm.getReceiptDefaultCost method.

---
M src/org/openbravo/costing/CostingAlgorithm.java
M src/org/openbravo/financial/FinancialUtils.java
---
(0087718)
aferraz   
2016-06-21 12:07   
Code review + Testing OK
(0087828)
hudsonbot   
2016-06-22 18:10   
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/468afe624cc8 [^]
Maturity status: Test
(0087829)
hudsonbot   
2016-06-22 18:10   
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/468afe624cc8 [^]
Maturity status: Test