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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0040601
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Retail Modules] Web POSmajoralways2019-04-11 18:152019-04-13 19:45
ReporterasiermartirenaView Statuspublic 
Assigned Toasiermartirena 
PrioritynormalResolutionfixedFixed in Version
StatusresolvedFix in branchFixed in SCM revisiona3c01b29e42f
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned To
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0040601: The calculateReceipt function is called to much times when changing prices

DescriptionThe calculateReceipt function is called to many times when changing prices in the Web POS.
If a line is selected to change the price, the calculateReceipt function is automatically launched on a backbone event when the price is updated, and is launched again after that. That second call mustn't be called.
If multiple lines are selected and their price is changed, one calculate receipt is launched for each line, and a final one is also called. This is visible for the user, because the first line is updated in the first calculateReceipt and the other ones in the final one. The middle executions are not done because of the logic that the calculate receipt has to avoid multiple (more than two, cause a final call is always launched) calls.
Steps To ReproduceAdd a breakpoint in the calculateReceipt function.
Add a line to the ticket.
Change the price --> The calculateReceipt is executed twice
Add a new line.
Select both lines and change the price --> The calculateReceipt is executed four times, even if the middle calls are not executed. The fourth call is the final call the calculateReceipt has to ensure that the process is executed with all the data updated.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0111118)
hgbot (developer)
2019-04-13 19:45

Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: a3c01b29e42f495e3c7fbf987df550d6bc8ec253
Author: Asier Martirena <asier.martirena <at> openbravo.com>
Date: Fri Apr 12 21:33:04 2019 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/a3c01b29e42f495e3c7fbf987df550d6bc8ec253 [^]

Fixed issue 40601: The calculateReceipt function is called to much times when changing prices

New API to set prices to lines. It should be always called, even if the call is only for a single line.
Removed the call of the calculate receipt done after the price is modified. Now, when updating a single line's price it is only called from the event launched when updating the price of the order line.
For multi selection, the calculateReceipt is disabled until the last price is updated. After that, it is enabled and launched.
Same modifications for the undo action.

---
M web/org.openbravo.retail.posterminal/js/model/order.js
M web/org.openbravo.retail.posterminal/js/pointofsale/view/keyboardorder.js
---

- Issue History
Date Modified Username Field Change
2019-04-11 18:15 asiermartirena New Issue
2019-04-11 18:15 asiermartirena Assigned To => asiermartirena
2019-04-11 18:15 asiermartirena Triggers an Emergency Pack => No
2019-04-13 19:45 hgbot Checkin
2019-04-13 19:45 hgbot Note Added: 0111118
2019-04-13 19:45 hgbot Status new => resolved
2019-04-13 19:45 hgbot Resolution open => fixed
2019-04-13 19:45 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/a3c01b29e42f495e3c7fbf987df550d6bc8ec253 [^]


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker