Anonymous | Login
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Retail Modules] Tax Exemptmajoralways2022-02-17 14:282022-03-16 14:51
ReporterjetxarriView Statuspublic 
Assigned Toranjith_qualiantech_com 
PriorityhighResolutionfixedFixed in VersionRR22Q2
StatusclosedFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget VersionRR20Q4
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned To
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo

0048619: Wrong tax assigned when you are using tax exempt ticket line and you have some taxes with same configuration

DescriptionWrong tax assigned when you are using tax exempt ticket line (or BP) and you have some taxes with same configuration.
Steps To ReproduceScenario:
-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 SolutionIn the following function

const checkTaxCategory = rule => {
      const isTaxExempt =
        line.taxExempt || ticket.businessPartner.taxExempt ;
      return (
          ? equals(rule.taxExempt, isTaxExempt)
          : equals(
            )) && 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 (
          ? equals(rule.taxExempt, isTaxExempt) && equals(
          : equals(
            )) && equals(rule.taxCategory, line.product.taxCategory)
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to defect 0049939 closedTriage Omni OMS Openbravo Localizations Two exempt taxes are applied for a tax exempt customer 

-  Notes
hgbot (developer)
2022-03-02 08:07

Merge Request created: [^]
hgbot (developer)
2022-03-16 14:49

Merge request merged: [^]
hgbot (developer)
2022-03-16 14:49

Directly closing issue as related merge request is already approved.

Repository: [^]
Changeset: 8b7a8ee4aff216ae4f27c2fb5bcabf5ef3ba364b
Author: Ranjith S R <>
Date: 16-03-2022 13:49:11
URL: [^]

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
hgbot (developer)
2022-03-16 14:51

Repository: [^]
Changeset: 6973c2f63a9bb9f0ce5c226518e6ea42c2c9cbd1
Author: Ranjith S R <>
Date: 16-03-2022 13:51:15
URL: [^]

Related to ISSUE-48619: Added Test for BPTaxCategory validations

A src-test/org/openbravo/taxes/test/data/
M src-test/org/openbravo/taxes/test/base/
M src-test/org/openbravo/taxes/test/base/model/
M src-test/org/openbravo/taxes/test/base/model/
M src-test/org/openbravo/taxes/test/base/model/
M src-test/org/openbravo/taxes/test/base/model/
M src-test/org/openbravo/taxes/test/unittests/
M src-test/org/openbravo/taxes/test/util/

- 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
Powered by Mantis Bugtracker