Openbravo Issue Tracking System - Retail Modules
View Issue Details
0029339Retail ModulesWeb POSpublic2015-03-18 17:482015-04-16 15:18
jecharri 
migueldejuana 
immediatecriticalalways
closedfixed 
5
 
RR15Q2 
adrianromero
Production - QA Approved
2014-12-11
RR15Q1
https://code.openbravo.com/erp/pmods/org.openbravo.retail.discounts/rev/354010b54e3a [^]
No
0029339: Discounts are not properly calculated in Q1.1 of 2015 version
Discounts are not properly calculated in Q1.1 of 2015 version

We are not rounding the final result of applying a discount and before Q1.1 we were doing it.
In Q3.5
-go to Web POS and create a ticket
0.53*12=6.36 -> apply 20% discount -> round(0.53 * 0.8, 2) = 0.42 -> 0.42*12=5.04

In Q1.1 of 2015
-go to Web POS and create a ticket
0.53*12=6.36 -> apply 20% discount -> 0.53 * 0.8 = 0.424 -> 0.424*12=5.088~=5.09
No tags attached.
related to defect 0028868 closed marvintm Cascade taxes are not properly applied 
depends on backport 0029345RR15Q1.3 closed migueldejuana Discounts are not properly calculated in Q1.1 of 2015 version 
caused by defect 0028358 closed migueldejuana Discounts rounding is not properly calculated 
blocks feature request 0028933RR16Q1 closed Retail QA: RR15Q2: Add tests for Mobile applications 
Issue History
2015-03-18 17:48jecharriNew Issue
2015-03-18 17:48jecharriAssigned To => Retail
2015-03-18 17:48jecharriRegression level => Production - QA Approved
2015-03-18 17:48jecharriRegression introduced in release => RR15Q1
2015-03-18 17:48jecharriTriggers an Emergency Pack => No
2015-03-18 19:06OrekariaRelationship addeddepends on 0028933
2015-03-18 19:06OrekariaRelationship replacedblocks 0028933
2015-03-18 19:07OrekariaRelationship addedrelated to 0028868
2015-03-19 11:02migueldejuanaRegression date => 2014-12-11
2015-03-19 11:02migueldejuanaRegression introduced by commit => https://code.openbravo.com/erp/pmods/org.openbravo.retail.discounts/rev/354010b54e3a [^]
2015-03-19 11:03migueldejuanaAssigned ToRetail => migueldejuana
2015-03-19 11:03migueldejuanaStatusnew => scheduled
2015-03-19 11:25hgbotCheckin
2015-03-19 11:25hgbotNote Added: 0075767
2015-03-19 11:25hgbotStatusscheduled => resolved
2015-03-19 11:25hgbotResolutionopen => fixed
2015-03-19 11:25hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.discounts/rev/4f4dd55ff95394b821439149e41239405b6a0f72 [^]
2015-03-19 11:50hgbotCheckin
2015-03-19 11:50hgbotNote Added: 0075769
2015-03-19 11:50hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.retail.discounts/rev/4f4dd55ff95394b821439149e41239405b6a0f72 [^] => http://code.openbravo.com/tools/automation/pi-mobile/rev/df0ae84ed721b99ce809d6756f8411e2bd626fa5 [^]
2015-03-19 12:03OrekariaRelationship addeddepends on 0028358
2015-03-20 10:53dmitry_mezentsevRelationship replacedcaused by 0028358
2015-03-20 11:09dmitry_mezentsevIssue Monitored: dmitry_mezentsev
2015-03-20 11:13migueldejuanaNote Added: 0075784
2015-03-24 16:25marvintmReview Assigned To => marvintm
2015-03-24 16:25marvintmStatusresolved => closed
2015-03-24 16:25marvintmFixed in Version => RR15Q2
2015-04-10 15:03hgbotCheckin
2015-04-10 15:03hgbotNote Added: 0076455
2015-04-10 15:03hgbotStatusclosed => resolved
2015-04-10 15:03hgbotFixed in SCM revisionhttp://code.openbravo.com/tools/automation/pi-mobile/rev/df0ae84ed721b99ce809d6756f8411e2bd626fa5 [^] => http://code.openbravo.com/retail/backports/3.0RR15Q1.3/org.openbravo.retail.discounts/rev/f78942ca26348142af4c6c56a1cd1a3a094886f4 [^]
2015-04-16 15:18adrianromeroReview Assigned Tomarvintm => adrianromero
2015-04-16 15:18adrianromeroNote Added: 0076592
2015-04-16 15:18adrianromeroStatusresolved => closed

Notes
(0075767)
hgbot   
2015-03-19 11:25   
Repository: erp/pmods/org.openbravo.retail.discounts
Changeset: 4f4dd55ff95394b821439149e41239405b6a0f72
Author: Miguel de Juana <miguel.dejuana <at> openbravo.com>
Date: Thu Mar 19 11:21:09 2015 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.discounts/rev/4f4dd55ff95394b821439149e41239405b6a0f72 [^]

Fixed issue 0029339: Discounts are not properly calculated in Q1.1 of 2015 version

Backout issue 28358

---
M web/org.openbravo.retail.discounts/js/promotion-manual.js
---
(0075769)
hgbot   
2015-03-19 11:50   
Repository: tools/automation/pi-mobile
Changeset: df0ae84ed721b99ce809d6756f8411e2bd626fa5
Author: Miguel de Juana <miguel.dejuana <at> openbravo.com>
Date: Thu Mar 19 11:19:27 2015 +0100
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/df0ae84ed721b99ce809d6756f8411e2bd626fa5 [^]

Fixed issue 0029339: Discounts are not properly calculated in Q1.1 of 2015 version

Backout issue 28358

---
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/discountsandpromotions/I28100_DiscountsNotAppliedToReturnLinesI.java
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/discountsandpromotions/I28100_DiscountsNotAppliedToReturnLinesII.java
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/discountsandpromotions/I28164_DiscountsRemovedWhenReturnPresentI.java
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/discountsandpromotions/I28164_DiscountsRemovedWhenReturnPresentII.java
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/discountsandpromotions/ReceiptDiscount.java
---
(0075784)
migueldejuana   
2015-03-20 11:13   
This is a regression, because we did a wrong fix over an wrong reported issue. When we apply discounts, we have to apply the discount to each item of the line, not to the total price of the line.

Example, you buy a computer and it has a 20% of discount, if you buy 2 computer, the 20% of discount is applyed to each computer and then they sum the price of each pc. It is a mistake to apply 20% of discount to the total price(sum of the 2 computers).
(0076455)
hgbot   
2015-04-10 15:03   
Repository: retail/backports/3.0RR15Q1.3/org.openbravo.retail.discounts
Changeset: f78942ca26348142af4c6c56a1cd1a3a094886f4
Author: Miguel de Juana <miguel.dejuana <at> openbravo.com>
Date: Thu Mar 19 11:21:09 2015 +0100
URL: http://code.openbravo.com/retail/backports/3.0RR15Q1.3/org.openbravo.retail.discounts/rev/f78942ca26348142af4c6c56a1cd1a3a094886f4 [^]

Fixed issue 0029339: Discounts are not properly calculated in Q1.1 of 2015 version

Backout issue 28358

---
M web/org.openbravo.retail.discounts/js/promotion-manual.js
---
(0076592)
adrianromero   
2015-04-16 15:18   
Verified