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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0033734
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Retail Modules] Discounts and Promotionsmajoralways2016-08-18 08:442016-09-01 16:03
ReporteraaroncaleroView Statuspublic 
Assigned Tojorge-garcia 
PriorityhighResolutionfixedFixed in Version
StatusclosedFix in branchFixed in SCM revision94dca5a2d2fa
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Tomigueldejuana
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0033734: [SERQA 1601]Total of the ticket is wrongly calculated due to the rounding of discounts

DescriptionWhen a line in web pos has a discount applied, and this discount has been rounded up (e.g. from 3.375 to 3.38), the total of the ticket is wrongly calculated.
Steps To ReproduceLogin in the erp (e.g. https://livebuilds.openbravo.com/retail_pi_pgsql/ [^]), White valley group admin role, and define the following discount:
Org: *
Type: Price Adjustment
Name: Sun Cream 27%
Starting Date: 1/1/2016
Included Products: Only those defined
Discount %: 27
Leave the rest of the fields as default.

On the Products subtab, add the 'Sun cream + lip stick' product.

Login in web pos (terminal: VBS-1), create an empty ticket and add a Sun cream + lip stick. The ticket will look as follows:
One line, Sun cream + lip stick; 1 unit; 12.50 total
-- Applied discount: Sun Cream 27%, amount: -3.38 (rounded up from 3.375)

Total of the ticket: 9.13

The ticket total should have been 12.50 - 3.38 = 9.12 and it is not.
Proposed SolutionThe total amount of the ticket should be calculated taking into account the rounded amounts of the discounts.
TagsSER-QA
Attached Filespng file icon discount.png [^] (80,501 bytes) 2016-08-18 08:50


png file icon pos.png [^] (76,719 bytes) 2016-08-18 08:50

- Relationships Relation Graph ] Dependency Graph ]
causes defect 0036003 closedranjith_qualiantech_com [RR17Q2] POS breaks when several discounts are applied to same product 

-  Notes
(0089373)
hgbot (developer)
2016-08-25 08:11

Repository: tools/automation/pi-mobile
Changeset: dd8238652d98bc8ab13feca0d19717c7f61775df
Author: Jorge Garcia <jorge.garcia <at> openbravo.com>
Date: Wed Aug 24 14:27:36 2016 +0200
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/dd8238652d98bc8ab13feca0d19717c7f61775df [^]

Verifies issue 33734: [SERQA 1601]Total of the ticket is wrongly calculated
due to the rounding of discounts

Added test I33734_WrongTotalWithRoundedPromotions.

---
A src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/receipts/I33734_WrongTotalWithRoundedPromotions.java
---
(0089374)
hgbot (developer)
2016-08-25 08:11

Repository: erp/pmods/org.openbravo.retail.sampledata
Changeset: f662b69f78387ed726861090d4edb64d816a7179
Author: Jorge Garcia <jorge.garcia <at> openbravo.com>
Date: Wed Aug 24 14:49:13 2016 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.sampledata/rev/f662b69f78387ed726861090d4edb64d816a7179 [^]

Related to issue 33734: [SERQA 1601]Total of the ticket is wrongly calculated
due to the rounding of discounts

New discount defined: Biby bag 27%

---
M referencedata/sampledata/The_White_Valley_Group/M_OFFER.xml
M referencedata/sampledata/The_White_Valley_Group/M_OFFER_PRODUCT.xml
---
(0089375)
hgbot (developer)
2016-08-25 08:12

Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 94dca5a2d2faa9390d578f061ce048616aa03514
Author: Jorge Garcia <jorge.garcia <at> openbravo.com>
Date: Wed Aug 24 13:40:22 2016 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/94dca5a2d2faa9390d578f061ce048616aa03514 [^]

Fixed issue 33734: [SERQA 1601]Total of the ticket is wrongly calculated
due to the rounding of discounts

The solution is calculate the total of the receipt with the amount discounted
rounded to the scale defined in the backend for the WebPOS.

---
M web/org.openbravo.retail.posterminal/js/model/order.js
---
(0089670)
migueldejuana (developer)
2016-09-01 16:03

Tested and reviewed

- Issue History
Date Modified Username Field Change
2016-08-18 08:44 aaroncalero New Issue
2016-08-18 08:44 aaroncalero Assigned To => Retail
2016-08-18 08:44 aaroncalero Triggers an Emergency Pack => No
2016-08-18 08:48 aaroncalero Summary Total of the ticket is wrongly calculated due to the rounding of discounts => [SERQA 1601]Total of the ticket is wrongly calculated due to the rounding of discounts
2016-08-18 08:48 aaroncalero Tag Attached: SER-QA
2016-08-18 08:50 aaroncalero File Added: discount.png
2016-08-18 08:50 aaroncalero File Added: pos.png
2016-08-22 14:44 jorge-garcia Status new => scheduled
2016-08-22 14:44 jorge-garcia Assigned To Retail => jorge-garcia
2016-08-25 08:11 hgbot Checkin
2016-08-25 08:11 hgbot Note Added: 0089373
2016-08-25 08:11 hgbot Checkin
2016-08-25 08:11 hgbot Note Added: 0089374
2016-08-25 08:12 hgbot Checkin
2016-08-25 08:12 hgbot Note Added: 0089375
2016-08-25 08:12 hgbot Status scheduled => resolved
2016-08-25 08:12 hgbot Resolution open => fixed
2016-08-25 08:12 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/94dca5a2d2faa9390d578f061ce048616aa03514 [^]
2016-09-01 16:03 migueldejuana Review Assigned To => migueldejuana
2016-09-01 16:03 migueldejuana Note Added: 0089670
2016-09-01 16:03 migueldejuana Status resolved => closed
2017-06-26 10:44 dmitry_mezentsev Relationship added causes 0036003


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker