Openbravo Issue Tracking System - Retail Modules
View Issue Details
0046071Retail ModulesWeb POSpublic2021-03-15 06:332021-09-29 09:06
marvintm 
ranjith_qualiantech_com 
normalmajoralways
closedfixed 
5
 
RR21Q3 
No
0046071: Tax calculation in the WebPOS should adjust the tax line with the greatest rounded difference
Sometimes, the tax engine needs to perform an adjustment on the lines if "Document based" tax calculation is used, in order to ensure that line amount match with the calculated taxes.

Currently, the line with the greatest tax amount is selected to be adjusted. A better choice however would be to select the one which has the greatest rounded difference (ie, the difference between the final tax amount, and the calculated amount that comes from applying the rate, without rounding).

This change will increase the scenarios in which the nets and taxes at line level actually match the theoretical tax rate that should have been applied.
.
No tags attached.
diff DKT_19Q3_TaxCalculation_GorkaIdea.diff (2,583) 2021-09-29 09:06
https://issues.openbravo.com/file_download.php?file_id=16232&type=bug
Issue History
2021-03-15 06:33marvintmNew Issue
2021-03-15 06:33marvintmAssigned To => Retail
2021-03-15 06:33marvintmTriggers an Emergency Pack => No
2021-03-15 06:34ranjith_qualiantech_comAssigned ToRetail => ranjith_qualiantech_com
2021-03-30 16:54hgbotNote Added: 0127038
2021-03-30 16:54hgbotNote Added: 0127039
2021-03-31 07:21hgbotResolutionopen => fixed
2021-03-31 07:21hgbotStatusnew => closed
2021-03-31 07:21hgbotNote Added: 0127047
2021-03-31 07:21hgbotFixed in Version => RR21Q2
2021-03-31 07:21hgbotNote Added: 0127048
2021-03-31 07:22hgbotNote Added: 0127049
2021-03-31 07:22hgbotNote Added: 0127050
2021-04-01 11:08hgbotNote Added: 0127077
2021-04-01 11:08hgbotNote Added: 0127078
2021-04-02 07:38ranjith_qualiantech_comStatusclosed => new
2021-04-02 07:38ranjith_qualiantech_comResolutionfixed => open
2021-04-02 07:38ranjith_qualiantech_comFixed in VersionRR21Q2 =>
2021-04-07 08:35hgbotNote Added: 0127121
2021-04-07 08:35hgbotNote Added: 0127122
2021-04-07 08:35hgbotNote Added: 0127123
2021-04-12 08:35hgbotResolutionopen => fixed
2021-04-12 08:35hgbotStatusnew => closed
2021-04-12 08:35hgbotNote Added: 0127218
2021-04-12 08:35hgbotFixed in Version => RR21Q3
2021-04-12 08:35hgbotNote Added: 0127219
2021-04-12 08:35hgbotNote Added: 0127220
2021-04-12 08:35hgbotNote Added: 0127221
2021-04-12 08:35hgbotNote Added: 0127222
2021-04-12 08:35hgbotNote Added: 0127223
2021-04-12 08:36marvintmNote Added: 0127224
2021-09-29 09:06ranjith_qualiantech_comFile Added: DKT_19Q3_TaxCalculation_GorkaIdea.diff

Notes
(0127038)
hgbot   
2021-03-30 16:54   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/363 [^]
(0127039)
hgbot   
2021-03-30 16:54   
Merge Request created: https://gitlab.com/openbravo/ci/mobile-test/-/merge_requests/76 [^]
(0127047)
hgbot   
2021-03-31 07:21   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/363 [^]
(0127048)
hgbot   
2021-03-31 07:21   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal [^]
Changeset: a286c73c231fb315a19a09dcd7c281bde3039ee8
Author: Ranjith S R <ranjith@qualiantech.com>
Date: 2021-03-31T05:20:23+00:00
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/commit/a286c73c231fb315a19a09dcd7c281bde3039ee8 [^]

Fixed ISSUE-46071: Updated Line NetAmount Adjustment calculation in Tax Engine
* Adjustment should be applied to the line where it has higher rounding amount

---
M web/org.openbravo.retail.posterminal/app/model/business-logic/taxes-engine/engine/rules/priceincluding-tax.js
M web/org.openbravo.retail.posterminal/app/model/business-logic/taxes-engine/engine/tax-rules.js
---
(0127049)
hgbot   
2021-03-31 07:22   
Merge request merged: https://gitlab.com/openbravo/ci/mobile-test/-/merge_requests/76 [^]
(0127050)
hgbot   
2021-03-31 07:22   
Repository: https://gitlab.com/openbravo/ci/mobile-test [^]
Changeset: 5a404e19be10582d6da72c5fb11cea3b8e8ce10b
Author: Ranjith S R <ranjith@qualiantech.com>
Date: 2021-03-30T08:37:24+05:30
URL: https://gitlab.com/openbravo/ci/mobile-test/-/commit/5a404e19be10582d6da72c5fb11cea3b8e8ce10b [^]

Verifies ISSUE-46071: Updated Test NormalCascadeAndDependantTaxesI

---
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/taxes/NormalCascadeAndDependantTaxesI.java
---
(0127077)
hgbot   
2021-04-01 11:08   
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal [^]
Changeset: 057af153c04447793d25ae7bb4c0f7f0a569bbe7
Author: Ranjith S R <ranjith@qualiantech.com>
Date: 2021-04-01T14:37:57+05:30
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/commit/057af153c04447793d25ae7bb4c0f7f0a569bbe7 [^]

Related to issue-46071: Reverted changes since test failing
This reverts commit a286c73c231fb315a19a09dcd7c281bde3039ee8.

---
M web/org.openbravo.retail.posterminal/app/model/business-logic/taxes-engine/engine/rules/priceincluding-tax.js
M web/org.openbravo.retail.posterminal/app/model/business-logic/taxes-engine/engine/tax-rules.js
---
(0127078)
hgbot   
2021-04-01 11:08   
Repository: https://gitlab.com/openbravo/ci/mobile-test [^]
Changeset: 746b49f11b39d5c918b9a64becf6103f6738a3a9
Author: Ranjith S R <ranjith@qualiantech.com>
Date: 2021-04-01T14:37:51+05:30
URL: https://gitlab.com/openbravo/ci/mobile-test/-/commit/746b49f11b39d5c918b9a64becf6103f6738a3a9 [^]

Related to issue-46071: Reverted changes since test failing
This reverts commit 5a404e19be10582d6da72c5fb11cea3b8e8ce10b.

---
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/taxes/NormalCascadeAndDependantTaxesI.java
---
(0127121)
hgbot   
2021-04-07 08:35   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/366 [^]
(0127122)
hgbot   
2021-04-07 08:35   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.taxes/-/merge_requests/4 [^]
(0127123)
hgbot   
2021-04-07 08:35   
Merge Request created: https://gitlab.com/openbravo/ci/mobile-test/-/merge_requests/77 [^]
(0127218)
hgbot   
2021-04-12 08:35   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/366 [^]
(0127219)
hgbot   
2021-04-12 08:35   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal [^]
Changeset: c25324eb001f0cfc2ecdfc00e005700751384731
Author: Ranjith S R <ranjith@qualiantech.com>
Date: 2021-04-12T06:35:29+00:00
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/commit/c25324eb001f0cfc2ecdfc00e005700751384731 [^]

Fixed ISSUE-46071: Updated Line NetAmount Adjustment calculation in Tax Engine
* Adjustment should be applied to the line where it has higher rounding amount
* For BOM Lines, Adjustment should be applied to the original line instead of BOM Line

---
M web/org.openbravo.retail.posterminal/app/model/business-logic/taxes-engine/engine/rules/priceincluding-tax.js
M web/org.openbravo.retail.posterminal/app/model/business-logic/taxes-engine/engine/tax-rules.js
---
(0127220)
hgbot   
2021-04-12 08:35   
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.taxes [^]
Changeset: defb98721a7f37d9f085d51705a47071d84d9b39
Author: Ranjith S R <ranjith@qualiantech.com>
Date: 2021-04-05T17:49:24+05:30
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.taxes/-/commit/defb98721a7f37d9f085d51705a47071d84d9b39 [^]

Related to ISSUE-46071: Updated Test for Tax Adjustment calculation

---
M src-test/org/openbravo/taxes/test/data/TaxesTestData09.java
M src-test/org/openbravo/taxes/test/data/TaxesTestData26.java
M src-test/org/openbravo/taxes/test/data/TaxesTestData35.java
M src-test/org/openbravo/taxes/test/data/TaxesTestData36.java
---
(0127221)
hgbot   
2021-04-12 08:35   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.taxes/-/merge_requests/4 [^]
(0127222)
hgbot   
2021-04-12 08:35   
Repository: https://gitlab.com/openbravo/ci/mobile-test [^]
Changeset: 82e16ab2237e939b886b536906ce9e288038007e
Author: Ranjith S R <ranjith@qualiantech.com>
Date: 2021-04-12T06:35:33+00:00
URL: https://gitlab.com/openbravo/ci/mobile-test/-/commit/82e16ab2237e939b886b536906ce9e288038007e [^]

Verifies ISSUE-46071: Updated Test NormalCascadeAndDependantTaxesI

---
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/taxes/NormalCascadeAndDependantTaxesI.java
---
(0127223)
hgbot   
2021-04-12 08:35   
Merge request merged: https://gitlab.com/openbravo/ci/mobile-test/-/merge_requests/77 [^]
(0127224)
marvintm   
2021-04-12 08:36   
Changes were reverted because of integration problems before 21Q2 was packaged. Final fix was included in 21Q3.