Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0048619 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Retail Modules] Tax Exempt | major | always | 2022-02-17 14:28 | 2022-03-16 14:51 | |||
Reporter | jetxarri | View Status | public | |||||
Assigned To | ranjith_qualiantech_com | |||||||
Priority | high | Resolution | fixed | Fixed in Version | RR22Q2 | |||
Status | closed | Fix in branch | Fixed in SCM revision | |||||
Projection | none | ETA | none | Target Version | RR20Q4 | |||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | SCM revision | |||||||
Review Assigned To | ||||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0048619: Wrong tax assigned when you are using tax exempt ticket line and you have some taxes with same configuration | |||||||
Description | Wrong tax assigned when you are using tax exempt ticket line (or BP) and you have some taxes with same configuration. | |||||||
Steps To Reproduce | Scenario: -2 taxes defined exactly equal and the only difference is the business partner tax category and valid from date -inside web POS, select a bp with tax exempt -Add a product with tax category of the defined tax rates Verify that the applied tax is the one with more recent valifFromDate. So change not applied tax with a newer validFromDate and do the same steps. Now the other tax is applied | |||||||
Proposed Solution | In the following function const checkTaxCategory = rule => { const isTaxExempt = line.taxExempt || ticket.businessPartner.taxExempt ; return ( (isTaxExempt ? equals(rule.taxExempt, isTaxExempt) : equals( rule.businessPartnerTaxCategory, ticket.businessPartner.taxCategory )) && equals(rule.taxCategory, line.product.taxCategory) ); }; When we check if "isTaxExempt" to get the rule (tax rate) we are only taking into account the checkbox "taxExempt" when we should check "taxExempt" check + the business partner tax category. return ( (isTaxExempt ? equals(rule.taxExempt, isTaxExempt) && equals( rule.businessPartnerTaxCategory, ticket.businessPartner.taxCategory ) : equals( rule.businessPartnerTaxCategory, ticket.businessPartner.taxCategory )) && equals(rule.taxCategory, line.product.taxCategory) ); | |||||||
Tags | NOR | |||||||
Attached Files | ||||||||
Relationships [ Relation Graph ] [ Dependency Graph ] | |||||||||
|
Notes | |
(0135375) hgbot (developer) 2022-03-02 08:07 |
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/730 [^] |
(0135777) hgbot (developer) 2022-03-16 14:49 |
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/730 [^] |
(0135778) hgbot (developer) 2022-03-16 14:49 |
Directly closing issue as related merge request is already approved. Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal [^] Changeset: 8b7a8ee4aff216ae4f27c2fb5bcabf5ef3ba364b Author: Ranjith S R <ranjith@qualiantech.com> Date: 16-03-2022 13:49:11 URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/commit/8b7a8ee4aff216ae4f27c2fb5bcabf5ef3ba364b [^] Fixed ISSUE-48619: Added BP TaxCategory validation for Tax Exempt - Rules must be filtered by business partner tax category always, regardless the ticket is exempt or not. - Rules must be filtered by tax exempt only in case ticket is exempt, because exempt rules can apply to non exempt business partners depending on the origin and destination of the goods, but non exempt rules can never apply to exempt business partners. --- M web/org.openbravo.retail.posterminal/app/model/business-logic/taxes-engine/engine/tax-engine.js --- |
(0135779) hgbot (developer) 2022-03-16 14:51 |
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.taxes [^] Changeset: 6973c2f63a9bb9f0ce5c226518e6ea42c2c9cbd1 Author: Ranjith S R <ranjith@qualiantech.com> Date: 16-03-2022 13:51:15 URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.taxes/-/commit/6973c2f63a9bb9f0ce5c226518e6ea42c2c9cbd1 [^] Related to ISSUE-48619: Added Test for BPTaxCategory validations --- A src-test/org/openbravo/taxes/test/data/TaxesTestData56.java M src-test/org/openbravo/taxes/test/base/Tax.java M src-test/org/openbravo/taxes/test/base/model/BusinessPartner.java M src-test/org/openbravo/taxes/test/base/model/BusinessPartnerTaxCategory.java M src-test/org/openbravo/taxes/test/base/model/TaxesRule.java M src-test/org/openbravo/taxes/test/base/model/TaxesRulesScenario.java M src-test/org/openbravo/taxes/test/unittests/TaxesTest.java M src-test/org/openbravo/taxes/test/util/TaxesTestConstants.java --- |
Issue History | |||
Date Modified | Username | Field | Change |
2022-02-17 14:28 | jetxarri | New Issue | |
2022-02-17 14:28 | jetxarri | Assigned To | => Retail |
2022-02-17 14:28 | jetxarri | Triggers an Emergency Pack | => No |
2022-02-17 14:41 | rafaroda | Tag Attached: NOR | |
2022-02-17 14:41 | rafaroda | Issue Monitored: rafaroda | |
2022-02-18 11:25 | ranjith_qualiantech_com | Assigned To | Retail => ranjith_qualiantech_com |
2022-02-18 11:37 | ranjith_qualiantech_com | Status | new => scheduled |
2022-03-02 08:07 | hgbot | Note Added: 0135375 | |
2022-03-16 14:49 | hgbot | Note Added: 0135777 | |
2022-03-16 14:49 | hgbot | Resolution | open => fixed |
2022-03-16 14:49 | hgbot | Status | scheduled => closed |
2022-03-16 14:49 | hgbot | Fixed in Version | => RR22Q2 |
2022-03-16 14:49 | hgbot | Note Added: 0135778 | |
2022-03-16 14:51 | hgbot | Note Added: 0135779 | |
2022-08-03 13:52 | rafaroda | Relationship added | related to 0049939 |
Copyright © 2000 - 2009 MantisBT Group |