|View Issue Details|
|Type||Category||Severity||Reproducibility||Date Submitted||Last Update|
|defect||[Retail Modules] Web POS||major||random||2017-04-05 15:46||2017-04-27 11:48|
|Priority||high||Resolution||fixed||Fixed in Version||RR17Q3|
|Status||closed||Fix in branch||Fixed in SCM revision||75bef8ae5e99|
|OS Version||Database version||Ant version|
|Product Version||SCM revision|
|Review Assigned To||guilleaer|
|Regression introduced in release|
|Regression introduced by commit|
|Triggers an Emergency Pack||No|
0035703: It is possible to count the same ticket twice on the same paymentmethodcashup
|Description||When a ticket is closed in web pos (i.e. by clicking on Done) several sql queries are executed on the local database before finally sending the ticket to the backend (cashup update, document number update, the final save of the receipt object).|
These queries must be executed inside a single sql transaction, in order to ensure that, if anything goes wrong or the user refreshes the application during the process, everything is rolled back and the pos remains as if the Done button was never pressed.
However the function which is in charge of updating the cashup report is placed outside the sql transaction, which means that a well timed refresh can leave inconsistent data (the cashup will be updated but the ticket will remain still on the screen).
|Steps To Reproduce||Login in web pos and perform a cashup keeping nothing.|
Verify using the Cash Up Partial window that all expected amounts are 0.
Open the browser console and set a breakpoint exactly after the cashup has been updated after closing a ticket:
-locate the mainReceiptCloseFunction
-inside that function, find the call to OB.UTIL.cashUpReport
-place the breakpoint on the first line of its callback
Create a new ticket, add a product, click on the total amount button and then finish the ticket by clicking on Done.
Once the execution stops on the breakpoint, refresh the page.
After reloading the page, open the Cashu Up partial window again and verify that the expected amount is no longer 0.
|Proposed Solution||The solution for this issue is to "swap" the calls to OB.UTIL.cashUpReport and OB.Dal.transaction, so the cashup report is updated inside the same sql transaction.|
|Tags||No tags attached.|
Author: Miguel de Juana <miguel.dejuana <at> openbravo.com>
Date: Mon Apr 10 17:41:42 2017 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/75bef8ae5e995bfe303d0c7a9f6277c607088528 [^]
Fixed issue 0035703: It is possible to count the same ticket twice on the same paymentmethodcashup
- The change is just few lines. Put OB.UTIL.cashuReport call inside the transaction to be able to do rollback of cashupinfo
|2017-04-05 15:46||aaroncalero||New Issue|
|2017-04-05 15:46||aaroncalero||Assigned To||=> Retail|
|2017-04-05 15:46||aaroncalero||Triggers an Emergency Pack||=> No|
|2017-04-10 17:14||migueldejuana||Relationship added||related to 0035745|
|2017-04-10 17:46||migueldejuana||Assigned To||Retail => migueldejuana|
|2017-04-10 17:46||migueldejuana||Status||new => acknowledged|
|2017-04-10 17:47||migueldejuana||Status||acknowledged => scheduled|
|2017-04-11 09:18||hgbot||Note Added: 0095962|
|2017-04-11 09:18||hgbot||Status||scheduled => resolved|
|2017-04-11 09:18||hgbot||Resolution||open => fixed|
|2017-04-11 09:18||hgbot||Fixed in SCM revision||=> http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/75bef8ae5e995bfe303d0c7a9f6277c607088528 [^]|
|2017-04-27 11:48||guilleaer||Review Assigned To||=> guilleaer|
|2017-04-27 11:48||guilleaer||Status||resolved => closed|
|2017-04-27 11:48||guilleaer||Fixed in Version||=> RR17Q3|
|Copyright © 2000 - 2009 MantisBT Group|