Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0038163Openbravo ERP09. Financial managementpublic2018-03-16 15:232018-03-29 13:07
markmm82 
markmm82 
highmajorhave not tried
closedfixed 
5
 
3.0PR18Q23.0PR18Q2 
aferraz
Core
No
0038163: Tax calculation adjustment must be done in the highest variance tax
Calculating taxes in Price Included taxes we usually loose precision rounding numbers and then we check if an adjustment is needed. Now, We take the greatest tax(the tax with highest amount) to apply the adjustment. We have to take the tax which applying the adjustment results the lowest variance with exact amount.

- If taxes are more than expected we have to add the adjustment to the tax with highest variance(below amount) from exact value.
- If taxes are less than expected we have to add the adjustment to the tax with highest variance(above amount) from exact value.
N/A
No tags attached.
related to design defect 0038160 closed migueldejuana Retail Modules Tax calculation adjustment must be done in the tax with the lowest variance after adjustment  
related to design defect 0032265 closed aferraz Openbravo ERP [SER QA 1434] Taxes at document level are not properly calculated in some cases 
depends on defect 00382073.0PR18Q2 closed markmm82 Openbravo ERP API change is required due to solution of issue 38163 
diff 38163.diff (10,367) 2018-03-21 19:18
https://issues.openbravo.com/file_download.php?file_id=11666&type=bug
Issue History
2018-03-16 15:23markmm82New Issue
2018-03-16 15:23markmm82Assigned To => Triage Finance
2018-03-16 15:23markmm82Modules => Core
2018-03-16 15:23markmm82Triggers an Emergency Pack => No
2018-03-16 15:23markmm82Assigned ToTriage Finance => markmm82
2018-03-16 15:23markmm82Statusnew => scheduled
2018-03-20 10:22aferrazRelationship addedrelated to 0038160
2018-03-21 19:18aferrazFile Added: 38163.diff
2018-03-22 13:42aferrazRelationship addedrelated to 0032265
2018-03-22 20:54markmm82Relationship addedcauses 0038207
2018-03-23 11:28aferrazRelationship replacedblocks 0038207
2018-03-23 11:30aferrazCategoryZ. Others => 09. Financial management
2018-03-26 18:13hgbotCheckin
2018-03-26 18:13hgbotNote Added: 0103531
2018-03-26 18:13hgbotStatusscheduled => resolved
2018-03-26 18:13hgbotResolutionopen => fixed
2018-03-26 18:13hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/f7cf839056890ac39c2d8d53f487d3b2912523b7 [^]
2018-03-26 18:13hgbotCheckin
2018-03-26 18:13hgbotNote Added: 0103532
2018-03-26 18:16hgbotCheckin
2018-03-26 18:16hgbotNote Added: 0103535
2018-03-26 18:17aferrazRelationship replaceddepends on 0038207
2018-03-26 18:34aferrazTarget Version => 3.0PR18Q2
2018-03-26 18:36aferrazTypedefect => design defect
2018-03-26 18:36aferrazReview Assigned To => aferraz
2018-03-26 18:36aferrazNote Added: 0103545
2018-03-26 18:36aferrazStatusresolved => closed
2018-03-26 18:36aferrazFixed in Version => 3.0PR18Q2
2018-03-29 13:07hudsonbotCheckin
2018-03-29 13:07hudsonbotNote Added: 0103633
2018-03-29 13:07hudsonbotCheckin
2018-03-29 13:07hudsonbotNote Added: 0103634

Notes
(0103531)
hgbot   
2018-03-26 18:13   
Repository: erp/devel/pi
Changeset: f7cf839056890ac39c2d8d53f487d3b2912523b7
Author: Mark <markmm82 <at> gmail.com>
Date: Sun Mar 25 18:46:54 2018 -0400
URL: http://code.openbravo.com/erp/devel/pi/rev/f7cf839056890ac39c2d8d53f487d3b2912523b7 [^]

Fixes issue 38163: Tax adjustment must be done in the closest variance tax

Adjusted the tax line that stays closest to the original amount (the one with the
lowest rounded tax amount - not rounded tax amount + adjustment amount).

---
M src-db/database/model/functions/C_INVOICELINETAX_ROUNDING.xml
M src-db/database/model/functions/C_INVOICELINETAX_ROUNDING_AMT.xml
M src-db/database/model/functions/C_INVOICETAX_ADJUSTMENT.xml
M src-db/database/model/functions/C_INVOICETAX_ROUNDING.xml
M src-db/database/model/functions/C_ORDERLINETAX_ROUNDING.xml
M src-db/database/model/functions/C_ORDERLINETAX_ROUNDING_AMT.xml
M src-db/database/model/functions/C_ORDERTAX_ADJUSTMENT.xml
M src-db/database/model/functions/C_ORDERTAX_ROUNDING.xml
M src-db/database/model/triggers/C_INVOICELINE_TRG2.xml
M src-db/database/model/triggers/C_ORDERLINE_TRG2.xml
---
(0103532)
hgbot   
2018-03-26 18:13   
Repository: erp/devel/pi
Changeset: ca0f109a23f9911e1a9a43ceb78843417722afe2
Author: Mark <markmm82 <at> gmail.com>
Date: Sun Mar 25 18:46:54 2018 -0400
URL: http://code.openbravo.com/erp/devel/pi/rev/ca0f109a23f9911e1a9a43ceb78843417722afe2 [^]

Related to issue 38163: Fixes TaxesTest suite

Fixes some tests of the TaxesTest suite, adapting them to the new adjustment logic.

---
M src-test/src/org/openbravo/test/taxes/data/TaxesTestData117.java
M src-test/src/org/openbravo/test/taxes/data/TaxesTestData118.java
M src-test/src/org/openbravo/test/taxes/data/TaxesTestData119.java
M src-test/src/org/openbravo/test/taxes/data/TaxesTestData120.java
M src-test/src/org/openbravo/test/taxes/data/TaxesTestData125.java
M src-test/src/org/openbravo/test/taxes/data/TaxesTestData126.java
M src-test/src/org/openbravo/test/taxes/data/TaxesTestData127.java
M src-test/src/org/openbravo/test/taxes/data/TaxesTestData128.java
M src-test/src/org/openbravo/test/taxes/data/TaxesTestData133.java
M src-test/src/org/openbravo/test/taxes/data/TaxesTestData134.java
M src-test/src/org/openbravo/test/taxes/data/TaxesTestData135.java
M src-test/src/org/openbravo/test/taxes/data/TaxesTestData136.java
M src-test/src/org/openbravo/test/taxes/data/TaxesTestData141.java
M src-test/src/org/openbravo/test/taxes/data/TaxesTestData142.java
M src-test/src/org/openbravo/test/taxes/data/TaxesTestData143.java
M src-test/src/org/openbravo/test/taxes/data/TaxesTestData144.java
M src-test/src/org/openbravo/test/taxes/data/TaxesTestData149.java
M src-test/src/org/openbravo/test/taxes/data/TaxesTestData150.java
M src-test/src/org/openbravo/test/taxes/data/TaxesTestData151.java
M src-test/src/org/openbravo/test/taxes/data/TaxesTestData152.java
M src-test/src/org/openbravo/test/taxes/data/TaxesTestData157.java
M src-test/src/org/openbravo/test/taxes/data/TaxesTestData158.java
M src-test/src/org/openbravo/test/taxes/data/TaxesTestData159.java
M src-test/src/org/openbravo/test/taxes/data/TaxesTestData160.java
---
(0103535)
hgbot   
2018-03-26 18:16   
Repository: erp/devel/api-checks
Changeset: 25d8ddb5f22a2d5a7b6ddaee0bfee43e0f4e6edb
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Mon Mar 26 18:15:57 2018 +0200
URL: http://code.openbravo.com/erp/devel/api-checks/rev/25d8ddb5f22a2d5a7b6ddaee0bfee43e0f4e6edb [^]

Fixes issue 38207: API change for issue 38163

---
M model/src-db/database/model/functions/C_INVOICELINETAX_ROUNDING.xml
M model/src-db/database/model/functions/C_INVOICELINETAX_ROUNDING_AMT.xml
M model/src-db/database/model/functions/C_INVOICETAX_ADJUSTMENT.xml
M model/src-db/database/model/functions/C_INVOICETAX_ROUNDING.xml
M model/src-db/database/model/functions/C_ORDERLINETAX_ROUNDING.xml
M model/src-db/database/model/functions/C_ORDERLINETAX_ROUNDING_AMT.xml
M model/src-db/database/model/functions/C_ORDERTAX_ADJUSTMENT.xml
M model/src-db/database/model/functions/C_ORDERTAX_ROUNDING.xml
M model/src-db/database/model/triggers/C_INVOICELINE_TRG2.xml
M model/src-db/database/model/triggers/C_ORDERLINE_TRG2.xml
---
(0103545)
aferraz   
2018-03-26 18:36   
Code review + Testing OK
(0103633)
hudsonbot   
2018-03-29 13:07   
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/ead4656f507e [^]
Maturity status: Test
(0103634)
hudsonbot   
2018-03-29 13:07   
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/ead4656f507e [^]
Maturity status: Test