Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0028358
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Retail Modules] Web POSmajoralways2014-12-08 23:122015-04-10 15:03
ReporterjecharriView Statuspublic 
Assigned Tomigueldejuana 
PriorityurgentResolutionfixedFixed in VersionRR15Q1
StatusclosedFix in branchFixed in SCM revision354010b54e3a
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Tomtaal
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0028358: Discounts rounding is not properly calculated

DescriptionDiscounts rounding is not properly calculated. The discounts are not being properly calculated so the total is wrong
Steps To Reproduce-Configure a product with price 10.82
-Go to Web POS
-Add 13 units of his product
-Apply 6 percent of discount

Verify that calculated discount is 8.45 instead of 8.44

140.66 * 0.06 = 8.4396 ~ 8.44
TagsNo tags attached.
Attached Filespng file icon Captura de pantalla 2014-12-08 a las 16.12.06.png [^] (250,025 bytes) 2014-12-08 23:12

- Relationships Relation Graph ] Dependency Graph ]
causes defect 0029339 closedmigueldejuana Discounts are not properly calculated in Q1.1 of 2015 version 

-  Notes
(0072422)
hgbot (developer)
2014-12-11 12:31

Repository: erp/pmods/org.openbravo.retail.discounts
Changeset: 354010b54e3a4243a8a61e99169c2664d03a6ef8
Author: Miguel de Juana <miguel.dejuana <at> openbravo.com>
Date: Thu Dec 11 12:30:16 2014 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.discounts/rev/354010b54e3a4243a8a61e99169c2664d03a6ef8 [^]

Fixed issue 0028358: Discounts rounding is not properly calculated

Before the change: price x OneUnit / discount = round(discount) and then roundedDiscount x qty. Loosing precision
Now: (price x qty) / discount = round(totalDiscount)

---
M web/org.openbravo.retail.discounts/js/promotion-manual.js
---
(0072444)
hgbot (developer)
2014-12-12 09:12

Repository: tools/automation/pi-mobile
Changeset: d02a9bc19b64692153753afbf275644d9b21a1fb
Author: Miguel de Juana <miguel.dejuana <at> openbravo.com>
Date: Thu Dec 11 18:05:03 2014 +0100
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/d02a9bc19b64692153753afbf275644d9b21a1fb [^]

Change test because 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
---
(0072674)
mtaal (manager)
2014-12-17 19:37

Reviewed and tested
(0075766)
hgbot (developer)
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
---
(0075768)
hgbot (developer)
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
---
(0075783)
migueldejuana (developer)
2015-03-20 11:12

This is not an issue, this is the expected behaviour. 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).
(0076454)
hgbot (developer)
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
---

- Issue History
Date Modified Username Field Change
2014-12-08 23:12 jecharri New Issue
2014-12-08 23:12 jecharri Assigned To => marvintm
2014-12-08 23:12 jecharri File Added: Captura de pantalla 2014-12-08 a las 16.12.06.png
2014-12-08 23:12 jecharri Triggers an Emergency Pack => No
2014-12-08 23:17 jecharri Steps to Reproduce Updated View Revisions
2014-12-11 12:31 hgbot Checkin
2014-12-11 12:31 hgbot Note Added: 0072422
2014-12-11 12:31 hgbot Status new => resolved
2014-12-11 12:31 hgbot Resolution open => fixed
2014-12-11 12:31 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.discounts/rev/354010b54e3a4243a8a61e99169c2664d03a6ef8 [^]
2014-12-11 12:32 migueldejuana Assigned To marvintm => migueldejuana
2014-12-12 09:12 hgbot Checkin
2014-12-12 09:12 hgbot Note Added: 0072444
2014-12-17 19:37 mtaal Review Assigned To => mtaal
2014-12-17 19:37 mtaal Note Added: 0072674
2014-12-17 19:37 mtaal Status resolved => closed
2014-12-17 19:37 mtaal Fixed in Version => RR15Q1
2015-03-19 11:25 hgbot Checkin
2015-03-19 11:25 hgbot Note Added: 0075766
2015-03-19 11:50 hgbot Checkin
2015-03-19 11:50 hgbot Note Added: 0075768
2015-03-19 12:03 Orekaria Relationship added blocks 0029339
2015-03-20 10:53 dmitry_mezentsev Relationship replaced causes 0029339
2015-03-20 11:09 dmitry_mezentsev Issue Monitored: dmitry_mezentsev
2015-03-20 11:12 migueldejuana Note Added: 0075783
2015-04-10 15:03 hgbot Checkin
2015-04-10 15:03 hgbot Note Added: 0076454


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker