Openbravo Issue Tracking System - Retail Modules
View Issue Details
0038160Retail ModulesWeb POSpublic2018-03-16 12:252018-03-27 16:37
migueldejuana 
migueldejuana 
normalmajoralways
closedfixed 
5
 
RR18Q2 
marvintm
No
0038160: Tax calculation adjustment must be done in the tax with the lowest variance after adjustment
Calculating taxes in Price Included taxes we usually loose precision rounding numbers and the we check if an adjustment is needed. Now, We take the greatest tax(the tax eith highest amount) to apply the adjustment. We have to take the tax which applying the adjustment results the lowest variance with exact amount.
n/a
No tags attached.
related to design defect 00381633.0PR18Q2 closed markmm82 Openbravo ERP Tax calculation adjustment must be done in the highest variance tax 
diff taxCalc17Q4posterminal.diff (8,852) 2018-03-21 16:16
https://issues.openbravo.com/file_download.php?file_id=11665&type=bug
Issue History
2018-03-16 12:25migueldejuanaNew Issue
2018-03-16 12:25migueldejuanaAssigned To => migueldejuana
2018-03-16 12:25migueldejuanaTriggers an Emergency Pack => No
2018-03-19 07:58hgbotCheckin
2018-03-19 07:58hgbotNote Added: 0103337
2018-03-19 07:58hgbotStatusnew => resolved
2018-03-19 07:58hgbotResolutionopen => fixed
2018-03-19 07:58hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/c363ac10912de143eb63fca1ed5686322f3fc9b5 [^]
2018-03-19 12:32hgbotCheckin
2018-03-19 12:32hgbotNote Added: 0103345
2018-03-19 12:32hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/c363ac10912de143eb63fca1ed5686322f3fc9b5 [^] => http://code.openbravo.com/tools/automation/pi-mobile/rev/68dec1f90f32c234078be9d78e8334e99397a5cc [^]
2018-03-20 10:22aferrazRelationship addedrelated to 0038163
2018-03-21 16:16migueldejuanaFile Added: taxCalc17Q4posterminal.diff
2018-03-21 16:50migueldejuanaSummaryTax calculation adjustment must be done in the highest variance tax => Tax calculation adjustment must be done in the lowest variance after adjustment tax
2018-03-21 16:50migueldejuanaDescription Updatedbug_revision_view_page.php?rev_id=16906#r16906
2018-03-21 16:50migueldejuanaSummaryTax calculation adjustment must be done in the lowest variance after adjustment tax => Tax calculation adjustment must be done in the tax with the lowest variance after adjustment
2018-03-22 06:36hgbotCheckin
2018-03-22 06:36hgbotNote Added: 0103393
2018-03-22 06:36hgbotFixed in SCM revisionhttp://code.openbravo.com/tools/automation/pi-mobile/rev/68dec1f90f32c234078be9d78e8334e99397a5cc [^] => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/1ea7ed5d8f4c1f7df0483ae267e7a74d6e126778 [^]
2018-03-22 06:37hgbotCheckin
2018-03-22 06:37hgbotNote Added: 0103394
2018-03-22 06:37hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/1ea7ed5d8f4c1f7df0483ae267e7a74d6e126778 [^] => http://code.openbravo.com/tools/automation/pi-mobile/rev/e99d90d0f592879e1460571dcba10c6ce6788e47 [^]
2018-03-22 06:37hgbotCheckin
2018-03-22 06:37hgbotNote Added: 0103395
2018-03-22 06:37hgbotFixed in SCM revisionhttp://code.openbravo.com/tools/automation/pi-mobile/rev/e99d90d0f592879e1460571dcba10c6ce6788e47 [^] => http://code.openbravo.com/tools/automation/pi-mobile/rev/b3b40cc881d97bda0d7e6bfafd2f7c9c9632f754 [^]
2018-03-22 06:37hgbotCheckin
2018-03-22 06:37hgbotNote Added: 0103396
2018-03-22 06:37hgbotFixed in SCM revisionhttp://code.openbravo.com/tools/automation/pi-mobile/rev/b3b40cc881d97bda0d7e6bfafd2f7c9c9632f754 [^] => http://code.openbravo.com/tools/automation/pi-mobile/rev/5a86595ae1fbf50e2c8ce49c13c573084131878b [^]
2018-03-22 06:37hgbotCheckin
2018-03-22 06:37hgbotNote Added: 0103397
2018-03-22 06:37hgbotFixed in SCM revisionhttp://code.openbravo.com/tools/automation/pi-mobile/rev/5a86595ae1fbf50e2c8ce49c13c573084131878b [^] => http://code.openbravo.com/tools/automation/pi-mobile/rev/c710950faecedc5ecc0607a87ca1a0543fb8d0f4 [^]
2018-03-22 06:37hgbotCheckin
2018-03-22 06:37hgbotNote Added: 0103398
2018-03-22 06:37hgbotFixed in SCM revisionhttp://code.openbravo.com/tools/automation/pi-mobile/rev/c710950faecedc5ecc0607a87ca1a0543fb8d0f4 [^] => http://code.openbravo.com/tools/automation/pi-mobile/rev/f24f1885d0351305ee1e123dca94267bc79f723b [^]
2018-03-22 06:37hgbotCheckin
2018-03-22 06:37hgbotNote Added: 0103399
2018-03-22 06:37hgbotFixed in SCM revisionhttp://code.openbravo.com/tools/automation/pi-mobile/rev/f24f1885d0351305ee1e123dca94267bc79f723b [^] => http://code.openbravo.com/erp/pmods/org.openbravo.retail.sampledata/rev/8e61bc93234fb40c468244dfe819aa8d6eab989d [^]
2018-03-22 06:37hgbotCheckin
2018-03-22 06:37hgbotNote Added: 0103400
2018-03-22 06:37hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.retail.sampledata/rev/8e61bc93234fb40c468244dfe819aa8d6eab989d [^] => http://code.openbravo.com/erp/pmods/org.openbravo.retail.sampledata/rev/a204418ff63272ea18e0e9a657bf46f9403ad237 [^]
2018-03-27 16:37marvintmReview Assigned To => marvintm
2018-03-27 16:37marvintmStatusresolved => closed
2018-03-27 16:37marvintmFixed in Version => RR18Q2

Notes
(0103337)
hgbot   
2018-03-19 07:58   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: c363ac10912de143eb63fca1ed5686322f3fc9b5
Author: Miguel de Juana <miguel.dejuana <at> openbravo.com>
Date: Fri Mar 16 12:29:51 2018 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/c363ac10912de143eb63fca1ed5686322f3fc9b5 [^]

Fixed issue 0038160: Tax calculation adjustment must be done in the highest variance tax

- Calculate exactAmount for taxes and set the variance between amount and exactAmount(taxes by line and taxes by document). If the adjustment is positive, take the highest negative tax. If the adjustment is negative, take the highest positive tax

---
M web/org.openbravo.retail.posterminal/js/data/dataordertaxes.js
---
(0103345)
hgbot   
2018-03-19 12:32   
Repository: tools/automation/pi-mobile
Changeset: 68dec1f90f32c234078be9d78e8334e99397a5cc
Author: Miguel de Juana <miguel.dejuana <at> openbravo.com>
Date: Fri Mar 16 12:25:54 2018 +0100
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/68dec1f90f32c234078be9d78e8334e99397a5cc [^]

Fixed issue 0038160: Tax calculation adjustment must be done in the highest variance tax

- Adapt tests to the new tax calculation logic

---
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/sales/taxes/MultipleLinesDependantTaxes.java
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/sales/taxes/ThreeProductsCascadeTaxes.java
---
(0103393)
hgbot   
2018-03-22 06:36   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 1ea7ed5d8f4c1f7df0483ae267e7a74d6e126778
Author: Miguel de Juana <miguel.dejuana <at> openbravo.com>
Date: Wed Mar 21 11:38:52 2018 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/1ea7ed5d8f4c1f7df0483ae267e7a74d6e126778 [^]

Fixed issue 0038160: Tax calculation adjustment must be done in the highest variance tax

- Select tax following: Choose ABS(taxAmt amount - (exactAmount + adjustment)) closest to 0
- Use rounded net instead of exactNet and remove variance because it is not needed

---
M web/org.openbravo.retail.posterminal/js/data/dataordertaxes.js
---
(0103394)
hgbot   
2018-03-22 06:37   
Repository: tools/automation/pi-mobile
Changeset: e99d90d0f592879e1460571dcba10c6ce6788e47
Author: Miguel de Juana <miguel.dejuana <at> openbravo.com>
Date: Mon Mar 19 16:15:58 2018 +0100
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/e99d90d0f592879e1460571dcba10c6ce6788e47 [^]

Fixed issue 0038160: Tax calculation adjustment must be done in the highest variance tax

- Adjust WebPOSTaxTerminalHelper to the new 3 taxes
- Add a test to check Ajust Highest variamce

---
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/sales/taxes/WebPOSTaxTerminalHelper.java
A src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/sales/taxes/I38160AdjustHighestVarianceTax.java
---
(0103395)
hgbot   
2018-03-22 06:37   
Repository: tools/automation/pi-mobile
Changeset: b3b40cc881d97bda0d7e6bfafd2f7c9c9632f754
Author: Miguel de Juana <miguel.dejuana <at> openbravo.com>
Date: Tue Mar 20 11:41:44 2018 +0100
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/b3b40cc881d97bda0d7e6bfafd2f7c9c9632f754 [^]

Fixed issue 0038160: Tax calculation adjustment must be done in the highest variance tax

- Adapt test to new taxes

---
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/receipts/I36071_VerifyNotServicesShownWhenProductNotAdd.java
---
(0103396)
hgbot   
2018-03-22 06:37   
Repository: tools/automation/pi-mobile
Changeset: 5a86595ae1fbf50e2c8ce49c13c573084131878b
Author: Miguel de Juana <miguel.dejuana <at> openbravo.com>
Date: Wed Mar 21 13:45:52 2018 +0100
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/5a86595ae1fbf50e2c8ce49c13c573084131878b [^]

Fixed issue 0038160: Tax calculation adjustment must be done in the highest variance tax

---
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/sales/taxes/I38160AdjustHighestVarianceTax.java
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/sales/taxes/ThreeProductsCascadeTaxes.java
---
(0103397)
hgbot   
2018-03-22 06:37   
Repository: tools/automation/pi-mobile
Changeset: c710950faecedc5ecc0607a87ca1a0543fb8d0f4
Author: Miguel de Juana <miguel.dejuana <at> openbravo.com>
Date: Wed Mar 21 14:24:41 2018 +0100
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/c710950faecedc5ecc0607a87ca1a0543fb8d0f4 [^]

Fixed issue 0038160: Tax calculation adjustment must be done in the highest variance tax

- Adapt tests to adjustment logic

---
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/sales/taxes/I38160AdjustHighestVarianceTax.java
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/sales/taxes/ThreeProductsCascadeTaxes.java
---
(0103398)
hgbot   
2018-03-22 06:37   
Repository: tools/automation/pi-mobile
Changeset: f24f1885d0351305ee1e123dca94267bc79f723b
Author: Miguel de Juana <miguel.dejuana <at> openbravo.com>
Date: Wed Mar 21 16:06:24 2018 +0100
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/f24f1885d0351305ee1e123dca94267bc79f723b [^]

Fixed issue 0038160: Tax calculation adjustment must be done in the highest variance tax

- Adjust to new tax calculation

---
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/sales/taxes/TwoSetsTaxesWithDependantTaxes.java
---
(0103399)
hgbot   
2018-03-22 06:37   
Repository: erp/pmods/org.openbravo.retail.sampledata
Changeset: 8e61bc93234fb40c468244dfe819aa8d6eab989d
Author: Miguel de Juana <miguel.dejuana <at> openbravo.com>
Date: Tue Mar 20 07:44:17 2018 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.sampledata/rev/8e61bc93234fb40c468244dfe819aa8d6eab989d [^]

Fixed issue 0038160: Tax calculation adjustment must be done in the highest variance tax

- Add a product with 2 dependant taxes

---
M referencedata/sampledata/The_White_Valley_Group/C_TAX.xml
M referencedata/sampledata/The_White_Valley_Group/C_TAXCATEGORY.xml
M referencedata/sampledata/The_White_Valley_Group/C_TAXCATEGORY_TRL.xml
M referencedata/sampledata/The_White_Valley_Group/C_TAX_ACCT.xml
M referencedata/sampledata/The_White_Valley_Group/C_TAX_TRL.xml
M referencedata/sampledata/The_White_Valley_Group/M_PRODUCT.xml
M referencedata/sampledata/The_White_Valley_Group/M_PRODUCTPRICE.xml
M referencedata/sampledata/The_White_Valley_Group/M_PRODUCT_ACCT.xml
M referencedata/sampledata/The_White_Valley_Group/OBRETCO_PROL_PRODUCT.xml
---
(0103400)
hgbot   
2018-03-22 06:37   
Repository: erp/pmods/org.openbravo.retail.sampledata
Changeset: a204418ff63272ea18e0e9a657bf46f9403ad237
Author: Miguel de Juana <miguel.dejuana <at> openbravo.com>
Date: Tue Mar 20 11:40:45 2018 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.sampledata/rev/a204418ff63272ea18e0e9a657bf46f9403ad237 [^]

Fixed issue 0038160: Tax calculation adjustment must be done in the highest variance tax

- Add costing to the new product

---
M referencedata/sampledata/The_White_Valley_Group/M_COSTING.xml
---