Openbravo Issue Tracking System - Retail Modules |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0046314 | Retail Modules | Web POS | public | 2021-04-21 12:59 | 2024-01-23 17:36 |
|
Reporter | psanjuan | |
Assigned To | jetxarri | |
Priority | urgent | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | |
Platform | | OS | 30 | OS Version | Openbravo Appliance 14.04 |
Product Version | | |
Target Version | | Fixed in Version | RR23Q2 | |
Merge Request Status | |
Review Assigned To | |
OBNetwork customer | |
Support ticket | |
Regression level | |
Regression date | |
Regression introduced in release | |
Regression introduced by commit | |
Triggers an Emergency Pack | No |
|
Summary | 0046314: Net Prices must be used if a sale is created for an exempt BP for products having a price list including taxes. |
Description | Net Prices must be used if a sale is created for an exempt BP for products having a price list including taxes.
Same would apply for those scenarios when the customer is not exempt, but the transaction itself it is exempt (ie. Intracommunity Sale). |
Steps To Reproduce | When a customer is “tax exempt” meaning all the taxes goes to 0%, the tax is well calculated but the price remains the same as with normal taxes.
For example :
If a product as 20% tax and its final price is 120€ :
If the customer is a regular customer :
the gross price of the product will be 120€ which is correct
The net price of the product will be 100€ which is correct
The amount of the tax will be 20€ which is correct
If the customer is “tax exempt” :
The gross price will be 120€ instead of 100€
The net price will be 120€ instead of 100€
The amount of the tax will be 0€ which is correct |
Proposed Solution | See Specs attached. |
Additional Information | |
Tags | NOR |
Relationships | related to | feature request | 0054438 | | new | aferraz | POS2 | Refactor price recalculation when there is a tax exempt | has duplicate | feature request | 0046598 | | closed | Retail | Retail Modules | Web POS needs to manage "Price List including taxes" under "tax exempt" scenarios. | related to | feature request | 0045755 | | closed | vmromanos | Openbravo Localizations | New taxes required set as Tax Exempt=Yes | related to | defect | 0045643 | | closed | ranjith_qualiantech_com | Retail Modules | Tax exempt usage is not applying in Tax Engine | related to | feature request | 0054073 | | closed | frank_gonzalez | POS2 | Country Compliance - Tax Rate Modification "Special Taxes" management in POS2 (React) |
|
Attached Files | |
|
Issue History |
Date Modified | Username | Field | Change |
2021-04-21 12:59 | psanjuan | New Issue | |
2021-04-21 12:59 | psanjuan | Assigned To | => Retail |
2021-04-21 12:59 | psanjuan | Triggers an Emergency Pack | => No |
2021-04-21 12:59 | psanjuan | Relationship added | related to 0045755 |
2021-04-21 17:24 | rafaroda | Relationship added | related to 0045643 |
2021-04-21 17:24 | rafaroda | Tag Attached: NOR | |
2021-04-21 17:24 | rafaroda | Issue Monitored: rafaroda | |
2021-05-10 12:14 | psanjuan | Relationship added | has duplicate 0046598 |
2021-05-10 12:17 | psanjuan | Summary | Prices (Gross/Net) must be recalculated if a sale is created for an exempt BP for products having a price list including taxes. => Net Prices must be used if a sale is created for an exempt BP for products having a price list including taxes. |
2021-05-10 12:17 | psanjuan | Description Updated | bug_revision_view_page.php?rev_id=22480#r22480 |
2021-05-10 12:17 | psanjuan | Steps to Reproduce Updated | bug_revision_view_page.php?rev_id=22482#r22482 |
2021-05-10 12:17 | psanjuan | Proposed Solution updated | |
2021-05-10 12:18 | psanjuan | Note Added: 0127938 | |
2021-05-10 13:36 | psanjuan | Note Added: 0127941 | |
2021-05-10 13:36 | psanjuan | Assigned To | Retail => psanjuan |
2021-05-31 12:58 | psanjuan | Note Added: 0128812 | |
2021-05-31 12:59 | psanjuan | Note Edited: 0128812 | bug_revision_view_page.php?bugnote_id=0128812#r22637 |
2022-09-28 14:23 | hgbot | Note Added: 0141445 | |
2022-10-18 11:32 | aferraz | Assigned To | psanjuan => jetxarri |
2023-01-04 08:46 | hgbot | Note Added: 0145155 | |
2023-01-25 13:13 | hgbot | Note Added: 0145833 | |
2023-01-30 08:18 | hgbot | Resolution | open => fixed |
2023-01-30 08:18 | hgbot | Status | new => closed |
2023-01-30 08:18 | hgbot | Note Added: 0145988 | |
2023-01-30 08:18 | hgbot | Fixed in Version | => RR23Q2 |
2023-01-30 08:18 | hgbot | Note Added: 0145989 | |
2023-01-30 08:19 | hgbot | Note Added: 0145990 | |
2023-01-30 08:19 | hgbot | Note Added: 0145991 | |
2023-01-30 08:20 | hgbot | Note Added: 0145992 | |
2023-01-30 08:20 | hgbot | Note Added: 0145993 | |
2024-01-23 17:36 | aferraz | Relationship added | related to 0054438 |
2024-01-23 17:36 | aferraz | Relationship added | related to 0054073 |
Notes |
|
|
|
|
|
This new function will be implemented by the services team, and later on contributed to the product. |
|
|
(0128812)
|
psanjuan
|
2021-05-31 12:58
(edited on: 2021-05-31 12:59) |
|
The Spec attached is not valid anymore as that is not the correct way to implement this feature.
Correct approach will be:
(1) If a sales line has got an "exempt" tax rate from the OB tax engine, and the price of that product is "including" taxes, what we can do is:
(1.1) create a simplified version of that sales order, containing that product, a Not Exempt BP (Anonymous customer) and the "store" address, therefore we can be sure that this new transaction is NOT exempt
(1.2) By doing so, we will be able to get the "tax rate" that would have applied to a Not Exempt sale, for us to calculate the net price of the product
(1.3) That net price will be persisted in the "original" sales line, therefore the net price and gross price will be the same one, as the "original" tax to apply is exempt.
(2) Obviously the creation of that simplified version of the sales order, will be fully transparent to the user
(3) In case the product is "Exempt" by definition (assigned to an Exempt Tax Category), we can assume that the gross price of the product will be without taxes in the price list, therefore regardless we will get an exempt tax rate in that simplified version of the sales order, the gross price and net price will be the same.
All of the above works if we assume that there is no EcoTax configured, otherwise we will have to adjust the tax engine to take into account the EcoTax configuration of a product.
In such cases, and if the customer provides the final gross price including both EcoTax and VAT, we will have to:
do the same as above, but in the step 1.2, subtract the EcoTax of that product from its gross price, before calculating the net price.
Once the Net Price is calculated and persisted in the sales line, we will have to add once again the EcoTax amount to the gross price.
What I mean is:
For instance we do have a product with a Product Price List (including taxes) = 122.00 (100.00 net price + 20.00 VAT + 2.00 EcoTax).
As this product has an EcoTax we will have to subtract it from the product (120.00) and then, calculate the price net of VAT (120/1+20%)=100.00
For an exempt customer, the correct price (price net of VAT) will be 102 (net price+EcoTax).
In fact, current Eco Tax feature is not working properly because VAT tax base calculation is including Eco Tax amounts, and it should not. See image attached.
So in this example, the correct Base for Tax calculation should be 118.80+21.75=140.55, therefore the correct VAT tax base amount of that transaction is 117.13 and the correct tax amount 23.43.
In this example it we sum-up all the amounts, there will be a rounding issue comparing with the "original" gross prices sum (145.50) vs [117.13 (net VAT prices) + 23.43 (VAT) + 4.95 (EcoTax)] = 145.51, we will have to some how adjust.
Having said that:
We need confirmation of below two topics:
* the assumption that end-customers providing gross prices in their price list including both VAT and EcoTax is correct
* the assumption that not taking into account EcoTax amounts in net prices of VAT calculations is correct.
|
|
|
(0141445)
|
hgbot
|
2022-09-28 14:23
|
|
|
|
(0145155)
|
hgbot
|
2023-01-04 08:46
|
|
|
|
(0145833)
|
hgbot
|
2023-01-25 13:13
|
|
|
|
(0145988)
|
hgbot
|
2023-01-30 08:18
|
|
|
|
(0145989)
|
hgbot
|
2023-01-30 08:18
|
|
Directly closing issue as related merge request is already approved.
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal [^]
Changeset: 132e3f3b51dc1674bcf5ca3193db957b3681d3b4
Author: Javier <javieretxarri@ekinbe.com>
Date: 30-01-2023 07:18:48
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/commit/132e3f3b51dc1674bcf5ca3193db957b3681d3b4 [^]
Fixes ISSUE-46314: Net prices must be used when having exempt BP and price list including taxes
---
A web-test/model/business-object/ticket/actions/SetBusinessPartner.test.js
A web/org.openbravo.retail.posterminal/app/model/business-object/ticket/actions/SetBusinessPartner.js
M src/org/openbravo/retail/posterminal/OBPOSComponentProvider.java
M web-test/model/business-object/ticket/CalculateTotalsModelHook.test.js
M web-test/model/business-object/ticket/actions/SetLinePrice.test.js
M web/org.openbravo.retail.posterminal/app/model/business-logic/taxes-engine/engine/tax-engine.js
M web/org.openbravo.retail.posterminal/app/model/business-object/ticket/TicketUtils.js
M web/org.openbravo.retail.posterminal/app/model/business-object/ticket/actions/CreateTicketFromQuotation.js
M web/org.openbravo.retail.posterminal/app/model/business-object/ticket/actions/SetLinePrice.js
M web/org.openbravo.retail.posterminal/js/model/order.js
---
|
|
|
(0145990)
|
hgbot
|
2023-01-30 08:19
|
|
Repository: https://gitlab.com/openbravo/ci/mobile-test [^]
Changeset: 87d4b82ff537ca2548139e446c6d7a03110d369d
Author: Javier <javieretxarri@ekinbe.com>
Date: 30-01-2023 07:19:54
URL: https://gitlab.com/openbravo/ci/mobile-test/-/commit/87d4b82ff537ca2548139e446c6d7a03110d369d [^]
Related to ISSUE-46314: Net prices must be used when having exempt BP and price list including taxes
---
M src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/taxexempt/TaxExemptBP.java
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/layaway/I37384_VerifyCustomerCreditLimit.java
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/multipricelists/I32217_MPLDiscountOnlyForOneCustomerAndDifferentTaxes.java
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/orderselector/VerifyOrderSelector.java
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/prepaymentsAndInvoiceTerms/OMNI010_CreateLayawayAfterOrderDelivery.java
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/prepaymentsAndInvoiceTerms/OMNI050_PayOpenTicketsAmountToLayawayAfterOrderDelivery.java
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/prepaymentsAndInvoiceTerms/OMNI070_CancelLayawayUndeliverableProductPrepaymentWithApprovalAfterOrderDelivery.java
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/prepaymentsAndInvoiceTerms/OMNI080_CancelLayawayServiceAsPerProductUndeliverableProductPrepaymentWithApprovalAfterOrderDelivery.java
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/receipts/I36243_ChangeDefaultBPLocation.java
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/receipts/I36920_GoodsShipmentBusinessPartnerWithDifferentAddresses.java
---
|
|
|
(0145991)
|
hgbot
|
2023-01-30 08:19
|
|
|
|
(0145992)
|
hgbot
|
2023-01-30 08:20
|
|
|
|
(0145993)
|
hgbot
|
2023-01-30 08:20
|
|
|