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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0035703
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Retail Modules] Web POSmajorrandom2017-04-05 15:462017-04-27 11:48
ReporteraaroncaleroView Statuspublic 
Assigned Tomigueldejuana 
PriorityhighResolutionfixedFixed in VersionRR17Q3
StatusclosedFix in branchFixed in SCM revision75bef8ae5e99
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Toguilleaer
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0035703: It is possible to count the same ticket twice on the same paymentmethodcashup

DescriptionWhen 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 ReproduceLogin 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 SolutionThe 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.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to defect 0035745 closedranjith_qualiantech_com Add a transaction where it is needed 

-  Notes
(0095962)
hgbot (developer)
2017-04-11 09:18

Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 75bef8ae5e995bfe303d0c7a9f6277c607088528
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

---
M web/org.openbravo.retail.posterminal/js/data/dataordersave.js
---

- 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


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker