Openbravo Issue Tracking System - Retail Modules
View Issue Details
0040601Retail ModulesWeb POSpublic2019-04-11 18:152019-05-24 13:07
asiermartirena 
asiermartirena 
normalmajoralways
closedfixed 
5
 
RR19Q3 
marvintm
No
No
0040601: The calculateReceipt function is called to much times when changing prices
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.
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.
No tags attached.
Issue History
2019-04-11 18:15asiermartirenaNew Issue
2019-04-11 18:15asiermartirenaAssigned To => asiermartirena
2019-04-11 18:15asiermartirenaOBNetwork customer => No
2019-04-11 18:15asiermartirenaTriggers an Emergency Pack => No
2019-04-13 19:45hgbotCheckin
2019-04-13 19:45hgbotNote Added: 0111118
2019-04-13 19:45hgbotStatusnew => resolved
2019-04-13 19:45hgbotResolutionopen => fixed
2019-04-13 19:45hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/a3c01b29e42f495e3c7fbf987df550d6bc8ec253 [^]
2019-04-24 18:45gorka_gilNote Added: 0111293
2019-04-24 18:45gorka_gilStatusresolved => new
2019-04-24 18:45gorka_gilResolutionfixed => open
2019-04-24 18:54hgbotCheckin
2019-04-24 18:54hgbotNote Added: 0111294
2019-04-29 17:00hgbotCheckin
2019-04-29 17:00hgbotNote Added: 0111372
2019-04-30 10:07asiermartirenaStatusnew => scheduled
2019-04-30 10:07asiermartirenaStatusscheduled => resolved
2019-04-30 10:07asiermartirenaResolutionopen => fixed
2019-04-30 13:43hgbotCheckin
2019-04-30 13:43hgbotNote Added: 0111387
2019-05-24 13:07marvintmReview Assigned To => marvintm
2019-05-24 13:07marvintmStatusresolved => closed
2019-05-24 13:07marvintmFixed in Version => RR19Q3

Notes
(0111118)
hgbot   
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
---
(0111293)
gorka_gil   
2019-04-24 18:45   
Reopen issue because fail a test of quarantine:
I38724_AllowPriceModificationVerifiedReturns
(0111294)
hgbot   
2019-04-24 18:54   
Repository: tools/automation/pi-mobile
Changeset: 29c125d8abda46dee5430f63b48420fea2a23d22
Author: Gorka Gil <gorka.gil <at> openbravo.com>
Date: Wed Apr 24 18:53:39 2019 +0200
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/29c125d8abda46dee5430f63b48420fea2a23d22 [^]

Related to issue 40601: disable test I38724_AllowPriceModificationVerifiedReturns till issue is resolved

---
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/receipts/I38724_AllowPriceModificationVerifiedReturns.java
---
(0111372)
hgbot   
2019-04-29 17:00   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 557f917bedfd2ff7e66f51742062675c996c1121
Author: Asier Martirena <asier.martirena <at> openbravo.com>
Date: Mon Apr 29 12:13:20 2019 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/557f917bedfd2ff7e66f51742062675c996c1121 [^]

Related to issue 40601: Call the calculateReceipt even if discounts are skipped

---
M web/org.openbravo.retail.posterminal/js/pointofsale/model/pointofsale-model.js
---
(0111387)
hgbot   
2019-04-30 13:43   
Repository: tools/automation/pi-mobile
Changeset: 5c840bf841fadad7a29e2a2e2123f8ba0f60834b
Author: Gorka Gil <gorka.gil <at> openbravo.com>
Date: Tue Apr 30 13:42:36 2019 +0200
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/5c840bf841fadad7a29e2a2e2123f8ba0f60834b [^]

Related to issue 40601: Remove anotation waitFixOf that is no longer needed

---
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/receipts/I38724_AllowPriceModificationVerifiedReturns.java
---