|View Issue Details|
|Type||Category||Severity||Reproducibility||Date Submitted||Last Update|
|defect||[Retail Modules] Web POS||major||always||2019-04-11 18:15||2019-04-13 19:45|
|Priority||normal||Resolution||fixed||Fixed in Version|
|Status||resolved||Fix in branch||Fixed in SCM revision||a3c01b29e42f|
|OS Version||Database version||Ant version|
|Product Version||SCM revision|
|Review Assigned To|
|Regression introduced in release|
|Regression introduced by commit|
|Triggers an Emergency Pack||No|
0040601: The calculateReceipt function is called to much times when changing prices
|Description||The 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 Reproduce||Add 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.
|Tags||No tags attached.|
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.
|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||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|