Openbravo Issue Tracking System - Retail Modules | ||||||||||||
View Issue Details | ||||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | |||||||
0035703 | Retail Modules | Web POS | public | 2017-04-05 15:46 | 2017-04-27 11:48 | |||||||
Reporter | aaroncalero | |||||||||||
Assigned To | migueldejuana | |||||||||||
Priority | high | Severity | major | Reproducibility | random | |||||||
Status | closed | Resolution | fixed | |||||||||
Platform | OS | 5 | OS Version | |||||||||
Product Version | ||||||||||||
Target Version | Fixed in Version | RR17Q3 | ||||||||||
Merge Request Status | ||||||||||||
Review Assigned To | guilleaer | |||||||||||
OBNetwork customer | ||||||||||||
Support ticket | ||||||||||||
Regression level | ||||||||||||
Regression date | ||||||||||||
Regression introduced in release | ||||||||||||
Regression introduced by commit | ||||||||||||
Triggers an Emergency Pack | No | |||||||||||
Summary | 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. | |||||||||||
Additional Information | ||||||||||||
Tags | No tags attached. | |||||||||||
Relationships |
| |||||||||||
Attached Files | ||||||||||||
Issue History | ||||||||||||
Date Modified | Username | Field | Change | |||||||||
2017-04-05 15:46 | aaroncalero | New Issue | ||||||||||
2017-04-05 15:46 | aaroncalero | Assigned To | => Retail | |||||||||
2017-04-05 15:46 | aaroncalero | Resolution time | => 1492552800 | |||||||||
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 | Checkin | ||||||||||
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 |
Notes | |||||
|
|||||
|
|