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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0028112
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Retail Modules] Discounts and Promotionsminoralways2014-11-06 17:492014-11-16 22:17
ReportermalsasuaView Statuspublic 
Assigned Tomarvintm 
PrioritynormalResolutionopenFixed in Version
StatusnewFix in branchFixed in SCM revision49270b838bce
ProjectionnoneETAnoneTarget Version
OSLinux 32 bitDatabasePostgreSQLJava version1.6.0_18
OS VersionCommunity ApplianceDatabase version8.3.9Ant version1.7.1
Product VersionSCM revision 
Review Assigned To
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0028112: the CalculateGross function is called several times

Descriptionwith old flow of discounts, the calculateGross function is run for each execution of discount per line, and it should be executed only in the last execution of discount (when the last line of receipt is processed)
Steps To Reproducein backoffice
. add preference:
  . property: WEB POS Enable New Flow Discount
  . value: N
  . visible at client: The White Valley Group
  . visible at org: *
  
in POS
. in console, add a breakpoint in the line
  evt.get('receipt').calculateGross();

. add several lines
. apply discretionary discount in all lines

for each line, calculateGross is called, and only it should be called once.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0071467)
hgbot (developer)
2014-11-06 17:54

Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 49270b838bced95716ba0194fee496fb7bfc8667
Author: Miguel A. Alsasua <miguel.alsasua <at> openbravo.com>
Date: Thu Nov 06 17:54:35 2014 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/49270b838bced95716ba0194fee496fb7bfc8667 [^]

fixed issue 28112:in the executor of discounts, calculateGross is executed when the eventQueue of executions of discount is void

---
M web/org.openbravo.retail.posterminal/js/model/executor.js
---
(0071677)
mtaal (manager)
2014-11-16 22:17

I checked/tested it and calculategross is still called twice when deleting a discount from a line.

When I delete a discount then also the pay button briefly shows the undiscounted amount. This seems related to the double call to calculate gross.

To reproduce:
- apply discounts to a line
- click on the line
- set a breakpoint in the calculategross method (for the ticket as a whole, so not the calculategross on line level)
- delete the discount
- see that the calculategross is called twice and that after the first call the pay button shows the total amount

- Issue History
Date Modified Username Field Change
2014-11-06 17:49 malsasua New Issue
2014-11-06 17:49 malsasua Assigned To => marvintm
2014-11-06 17:49 malsasua Triggers an Emergency Pack => No
2014-11-06 17:54 hgbot Checkin
2014-11-06 17:54 hgbot Note Added: 0071467
2014-11-06 17:54 hgbot Status new => resolved
2014-11-06 17:54 hgbot Resolution open => fixed
2014-11-06 17:54 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/49270b838bced95716ba0194fee496fb7bfc8667 [^]
2014-11-16 22:17 mtaal Note Added: 0071677
2014-11-16 22:17 mtaal Status resolved => new
2014-11-16 22:17 mtaal Resolution fixed => open


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker