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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0039264
TypeCategorySeverityReproducibilityDate SubmittedLast Update
backport[Retail Modules] Web POSmajoralways2018-08-03 15:012018-09-18 18:16
ReportermarvintmView Statuspublic 
Assigned Tomigueldejuana 
PriorityhighResolutionfixedFixed in VersionRR18Q3.1
StatusclosedFix in branchFixed in SCM revision17c1ad8af5b1
ProjectionnoneETAnoneTarget VersionRR18Q3.1
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Tomarvintm
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0039264: In some circumstances, cashup may be synchronized twice and the second one generates entry in "Errors while importing POS data"

DescriptionIn some circumstances, the cashup may be synchronized twice. The first time it will be processed correctly, but the second time detects that the cashup was already processed, and therefore generates an Error while importing POS Data.

Steps To Reproduce- Go to the cashup window.
- Go through all steps to complete the cashup.
- Before clicking on "Post, print and close" button, add a breakpoint in the client side, in the line:

"OB.RR.ServTypeFailover.implementation(service, request);"

- Click on the button. Flow will continue until the line with the breakpoint.
- Execute that line, but not the rest of the flow. The request will be done, and the cashup will be processed in the backend. This is correct.
- Then, press F5, or close the browser, and then access the WebPOS again.
- Once you have logged in, you will see that the cashup has already been sent again, and this time it has failed.

Real customers are reproducing this problem very rarely, with slow computers, and by closing the browser before the process to complete the cashup has been fully executed.
Proposed SolutionThe problem is that the generation of the message and the deletion of the cashup is still not fully transactional.

We need to make sure that both the message generation and the cashup deletion are executed in the same database transaction, but also before the request is triggered, because otherwise there is a risk that the deletion may not happen before the request is done, and even if the message is not generated, the cashup has already arrived to the backend, and should have already been removed from the client side.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
blocks defect 0039092 closedmigueldejuana In some circumstances, cashup may be synchronized twice and the second one generates entry in "Errors while importing POS data" 

-  Notes
(0106682)
hgbot (developer)
2018-09-11 14:54

Repository: retail/backports/3.0RR18Q3.1/org.openbravo.retail.posterminal
Changeset: 1875838e4ce4c243131597184d95cc355a96b52a
Author: Miguel de Juana <miguel.dejuana <at> openbravo.com>
Date: Tue Sep 11 14:53:55 2018 +0200
URL: http://code.openbravo.com/retail/backports/3.0RR18Q3.1/org.openbravo.retail.posterminal/rev/1875838e4ce4c243131597184d95cc355a96b52a [^]

Fixed issue 0039264: In some circumstances, cashup may be synchronized twice and the second one generates entry in "Errors while importing POS data"

- Define a removeSyncedElemsCallback to deleteCashups tables in cashup model.
- Make synchronous the deleteCashups function
- Allow to pass last cashup to initCashup createNewCashup function. Add a function createPaymentMethods which includes existing code

---
M web/org.openbravo.retail.posterminal/js/login/model/login-model.js
M web/org.openbravo.retail.posterminal/js/utils/cashUpReportUtils.js
---
(0106683)
hgbot (developer)
2018-09-11 14:54

Repository: retail/backports/3.0RR18Q3.1/org.openbravo.mobile.core
Changeset: 17c1ad8af5b1e9beaff3832b8e1ecd9cf32fa9d4
Author: Miguel de Juana <miguel.dejuana <at> openbravo.com>
Date: Tue Sep 11 14:52:03 2018 +0200
URL: http://code.openbravo.com/retail/backports/3.0RR18Q3.1/org.openbravo.mobile.core/rev/17c1ad8af5b1e9beaff3832b8e1ecd9cf32fa9d4 [^]

Fixed issue 0039264: In some circumstances, cashup may be synchronized twice and the second one generates entry in "Errors while importing POS data"

- Ensure that we do not send messages till we fully finished transaction (create message/remove model). Only for non persistent
- Allow to execute removeSyncedElemsCallback for a model which defines this
- Do not forget to execute generic removeSyncedElemsCallback to continue with the rest of models
- Wait to sendMessages just for models coming from runSyncProcess
- Execute callback(sendMessages) also for persistent models

---
M web/org.openbravo.mobile.core/source/data/ob-datasource.js
M web/org.openbravo.mobile.core/source/data/ob-requestrouter.js
M web/org.openbravo.mobile.core/source/model/ob-terminal-model.js
---

- Issue History
Date Modified Username Field Change
2018-09-11 14:50 migueldejuana Type defect => backport
2018-09-11 14:50 migueldejuana Target Version => RR18Q3.1
2018-09-11 14:54 hgbot Checkin
2018-09-11 14:54 hgbot Note Added: 0106682
2018-09-11 14:54 hgbot Status scheduled => resolved
2018-09-11 14:54 hgbot Resolution open => fixed
2018-09-11 14:54 hgbot Fixed in SCM revision http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/39a43eb397a2761a529ba95c417bf1c5c14008a9 [^] => http://code.openbravo.com/retail/backports/3.0RR18Q3.1/org.openbravo.retail.posterminal/rev/1875838e4ce4c243131597184d95cc355a96b52a [^]
2018-09-11 14:54 hgbot Checkin
2018-09-11 14:54 hgbot Note Added: 0106683
2018-09-11 14:54 hgbot Fixed in SCM revision http://code.openbravo.com/retail/backports/3.0RR18Q3.1/org.openbravo.retail.posterminal/rev/1875838e4ce4c243131597184d95cc355a96b52a [^] => http://code.openbravo.com/retail/backports/3.0RR18Q3.1/org.openbravo.mobile.core/rev/17c1ad8af5b1e9beaff3832b8e1ecd9cf32fa9d4 [^]
2018-09-18 18:16 marvintm Status resolved => closed
2018-09-18 18:16 marvintm Fixed in Version => RR18Q3.1


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker