Openbravo Issue Tracking System - Retail Modules
View Issue Details
0040213Retail ModulesWeb POSpublic2019-02-15 10:292019-03-22 17:01
gorkaion 
rqueralta 
urgentmajoralways
closedfixed 
5
 
RR19Q2 
marvintm
No
0040213: wrong net amount calculated when having tax in cascade, tax included pricelist and discounts
On an environment with a Tax Category such as IVA + IEPS and a price including taxes price list.

If the product has some discount and promotion of type "Price Adjustment" applied the calculated net amount is wrong in some cases.
On the Backend:

Configure a TAX Category "IVA 0% IEPS 8%"

Configure a summary tax rate.
Configure a Tax Rate for IEPS with:
- Rate 8
- Document Tax Amount Calculation: Document based amount by rate
- Base Amount: Line Net Amount
- Line No: 10
- Parent Tax Rate: The summary tax rate
Configure a Tax Rate for IVA with:
- Rate 0
- Document Tax Amount Calculation: Document based amount by rate
- Base Amount: Line Net Amount + Tax Amount
- Base Tax Rate: IEPS
- Line No: 20
- Parent Tax Rate: The summary tax rate


On a Store configured with a price list including taxes:
Create a product with price 192.67
Create a product with price 385.35
Add a Price Adjustment type Discount and Promotion of 50% only to the second product. So the final price is also 192.67
Add both products to the assortment

On the POS:
Create a ticket with the first product and pay it.
Create a ticket with the second product and pay it.

On the Backend:
Check that both tickets have the same gross and tax amounts but the net of the product with discount is wrong and the sum of the nets plus taxes is not the gross amount.
 
It seems that when the taxes are calculated the product price after the discount is applied is not rounded to the standard precission.
No tags attached.
Issue History
2019-02-15 10:29gorkaionNew Issue
2019-02-15 10:29gorkaionAssigned To => Retail
2019-02-15 10:29gorkaionResolution time => 1551999600
2019-02-15 10:29gorkaionTriggers an Emergency Pack => No
2019-02-15 11:03ngarciaIssue Monitored: ngarcia
2019-02-16 04:14rqueraltaAssigned ToRetail => rqueralta
2019-02-16 04:14rqueraltaStatusnew => scheduled
2019-02-18 11:00gorkaionDescription Updatedbug_revision_view_page.php?rev_id=18340#r18340
2019-02-18 11:01gorkaionSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=18342#r18342
2019-02-20 12:28ngarciaSummarywrong net amount calcuated when having tax in cascade, tax included pricelist and discounts => wrong net amount calculated when having tax in cascade, tax included pricelist and discounts
2019-02-23 01:13hgbotCheckin
2019-02-23 01:13hgbotNote Added: 0110038
2019-02-23 01:13hgbotStatusscheduled => resolved
2019-02-23 01:13hgbotResolutionopen => fixed
2019-02-23 01:13hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/71ccb8f3ad521b90428e11c1199e5db1f9fb103d [^]
2019-02-23 01:14hgbotCheckin
2019-02-23 01:14hgbotNote Added: 0110039
2019-02-24 03:03hgbotCheckin
2019-02-24 03:03hgbotNote Added: 0110040
2019-03-01 09:17marvintmReview Assigned To => marvintm
2019-03-01 09:17marvintmStatusresolved => closed
2019-03-01 09:17marvintmFixed in Version => RR19Q2
2019-03-06 18:53hgbotCheckin
2019-03-06 18:53hgbotNote Added: 0110271
2019-03-20 14:59hgbotCheckin
2019-03-20 14:59hgbotNote Added: 0110514
2019-03-22 17:01hgbotCheckin
2019-03-22 17:01hgbotNote Added: 0110596

Notes
(0110038)
hgbot   
2019-02-23 01:13   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 71ccb8f3ad521b90428e11c1199e5db1f9fb103d
Author: Rafael Queralta <rafaelcuba81 <at> gmail.com>
Date: Mon Feb 18 13:58:46 2019 -0500
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/71ccb8f3ad521b90428e11c1199e5db1f9fb103d [^]

Fixed issue 40213: wrong net amount calcuated when having tax in cascade, tax
included pricelist and discounts

- Rounded to the standard precission the discount line price

---
M web/org.openbravo.retail.posterminal/js/model/discounts.js
---
(0110039)
hgbot   
2019-02-23 01:14   
Repository: tools/automation/pi-mobile
Changeset: 7f4531b9950d85e9d463e3a11d152162acced177
Author: Rafael Queralta <rafaelcuba81 <at> gmail.com>
Date: Fri Feb 22 19:11:24 2019 -0500
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/7f4531b9950d85e9d463e3a11d152162acced177 [^]

Related to issue 40213: Changed value discount

---
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/cashup/I35216_VerifyCashUpSplitLines.java
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/discountsandpromotions/Communit6780_FixedPercentageDiscount.java
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/discountsandpromotions/I32601_ReturnLineAndApplyPromotion.java
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/receipts/I33734_WrongTotalWithRoundedPromotions.java
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/splitline/SplitLineWithAutomaticAndManualPromoPriceAdjust.java
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/splitline/SplitLineWithAutomaticPriceAdjust.java
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/splitline/SplitLineWithAutomaticPromo.java
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/splitline/SplitLineWithAutomaticPromoPriceAdjust.java
---
(0110040)
hgbot   
2019-02-24 03:03   
Repository: tools/automation/pi-mobile
Changeset: 7df5f5f13306d49220f45b392a4bbf3cc8343917
Author: Rafael Queralta <rafaelcuba81 <at> gmail.com>
Date: Sat Feb 23 21:00:44 2019 -0500
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/7df5f5f13306d49220f45b392a4bbf3cc8343917 [^]

Related to issue 40213: Changed value discount

---
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/cashup/I35216_VerifyCashUpSplitLines.java
---
(0110271)
hgbot   
2019-03-06 18:53   
Repository: tools/automation/pi-mobile
Changeset: c8db1acf4a08c837e5cd6f46871dceea410e1f96
Author: Rafael Queralta <rafaelcuba81 <at> gmail.com>
Date: Wed Mar 06 12:17:43 2019 -0500
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/c8db1acf4a08c837e5cd6f46871dceea410e1f96 [^]

Related to issue 40213. Backout this change to stabilize quarantine

---
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/cashup/I35216_VerifyCashUpSplitLines.java
---
(0110514)
hgbot   
2019-03-20 14:59   
Repository: tools/automation/pi-mobile
Changeset: dc309fe463d961c589f412c125f7d3d25ed45edc
Author: Alejandro <alekosmp86 <at> gmail.com>
Date: Thu Feb 28 16:42:27 2019 -0500
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/dc309fe463d961c589f412c125f7d3d25ed45edc [^]

Related to issue 40213: added automated test

---
A src-test/org/openbravo/test/mobile/retail/extmodules/selenium/suites/concurrent/job011/DiscountsPriceAdjSuite.java
A src-test/org/openbravo/test/mobile/retail/extmodules/selenium/suites/concurrent/job011/DiscountsPriceAdjSuiteHV.java
A src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/discounts_pricedjustment/AllDiscountsPriceAdjHV.java
A src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/discounts_pricedjustment/AllDiscountsPriceAdjTests.java
A src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/discounts_pricedjustment/I40213_VerifyNetAmountWithTaxesInCascade.java
---
(0110596)
hgbot   
2019-03-22 17:01   
Repository: tools/automation/pi-mobile
Changeset: de53fdc7aec2b6232e37320c3a95a1105198bbc1
Author: Alejandro <alekosmp86 <at> gmail.com>
Date: Thu Mar 21 13:27:34 2019 -0400
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/de53fdc7aec2b6232e37320c3a95a1105198bbc1 [^]

Related to issue 40213: fixed test due to changes in sampledata

---
M src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/discounts_pricedjustment/I40213_VerifyNetAmountWithTaxesInCascade.java
---