Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0046314 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
feature request | [Retail Modules] Web POS | major | always | 2021-04-21 12:59 | 2024-01-23 17:36 | |||
Reporter | psanjuan | View Status | public | |||||
Assigned To | jetxarri | |||||||
Priority | urgent | Resolution | fixed | Fixed in Version | RR23Q2 | |||
Status | closed | Fix in branch | Fixed in SCM revision | |||||
Projection | none | ETA | none | Target Version | ||||
OS | Linux 64 bit | Database | PostgreSQL | Java version | 7.x | |||
OS Version | Openbravo Appliance 14.04 | Database version | 9.3.x | Ant version | 1.9.x | |||
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 | 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. | |||||||
Tags | NOR | |||||||
Attached Files | ||||||||
Relationships [ Relation Graph ] [ Dependency Graph ] | |||||||||||||||||||||||||||||||||||||||||
|
Notes | |
(0127938) psanjuan (manager) 2021-05-10 12:18 |
See Specs: https://docs.google.com/document/d/1z9VZdMaX11wHhI74o83obQfgjoqWgmop5eds9lq5-RY/edit?ts=60895ae8 [^] |
(0127941) psanjuan (manager) 2021-05-10 13:36 |
This new function will be implemented by the services team, and later on contributed to the product. |
(0128812) psanjuan (manager) 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 (developer) 2022-09-28 14:23 |
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/941 [^] |
(0145155) hgbot (developer) 2023-01-04 08:46 |
Merge Request created: https://gitlab.com/openbravo/ci/mobile-test/-/merge_requests/254 [^] |
(0145833) hgbot (developer) 2023-01-25 13:13 |
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.taxes/-/merge_requests/15 [^] |
(0145988) hgbot (developer) 2023-01-30 08:18 |
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/941 [^] |
(0145989) hgbot (developer) 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 (developer) 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 (developer) 2023-01-30 08:19 |
Merge request merged: https://gitlab.com/openbravo/ci/mobile-test/-/merge_requests/254 [^] |
(0145992) hgbot (developer) 2023-01-30 08:20 |
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.taxes [^] Changeset: 02c5c4399068adbf62e69da1539dcf9b9eb7f82e Author: Javier <javieretxarri@ekinbe.com> Date: 30-01-2023 07:20:50 URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.taxes/-/commit/02c5c4399068adbf62e69da1539dcf9b9eb7f82e [^] Related to ISSUE-46314: Net prices must be used when having exempt BP and price list including taxes --- A src-test/org/openbravo/taxes/test/data/TaxesTestData57.java A src-test/org/openbravo/taxes/test/data/TaxesTestData58.java M src-test/org/openbravo/taxes/test/base/model/Ticket.java M src-test/org/openbravo/taxes/test/unittests/TaxesTest.java --- |
(0145993) hgbot (developer) 2023-01-30 08:20 |
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.taxes/-/merge_requests/15 [^] |
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 | View Revisions |
2021-05-10 12:17 | psanjuan | Steps to Reproduce Updated | View Revisions |
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 | View Revisions |
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 |
Copyright © 2000 - 2009 MantisBT Group |