Openbravo Issue Tracking System - Retail Modules
View Issue Details
0040388Retail ModulesWeb POSpublic2019-03-14 12:112019-12-18 13:14
ngarcia 
migueldejuana 
urgentmajoralways
closedfixed 
5
 
RR18Q4.3RR18Q4.3 
marvintm
No
0040388: Two cash ups in local storage if the backoffice session is closed during the cash up
Two cash ups in local storage if the backoffice session is closed during the cash up. It causes the following orders to go to Errors While Importing POS Data with the following error as the JSON has the two cash up identifiers:

javax.persistence.EntityNotFoundException: No row with the given identifier exists: [OBPOS_App_Cashup#...]
Link a terminal
Log in
Open Till
Do some orders
Open backoffice in the same browser (Back Office menu entry in the POS)
Return to POS
Do the Cash up but do not complete the Step 4
Log out in the backoffice
Return to POS
Post, print and close
Check the following error message is shown:

"The connection was restored. However, in the meantime, your session timed out. You must login again now to ensure proper synchronization. Your pending tickets will be saved."

Click on Log in again
Open Till again
Do some orders

Check the go to Errors While Importing POS Data

If you check the cashup table in browser's local storage, you could observe there are two records
No tags attached.
blocks defect 0040379 closed migueldejuana Two cash ups in local storage if the backoffice session is closed during the cash up 
Issue History
2019-03-15 08:31migueldejuanaTypedefect => backport
2019-03-15 08:31migueldejuanaTarget Version => RR18Q4.3
2019-04-02 10:22hgbotCheckin
2019-04-02 10:22hgbotNote Added: 0110962
2019-04-02 10:22hgbotStatusscheduled => resolved
2019-04-02 10:22hgbotResolutionopen => fixed
2019-04-02 10:22hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/f88298391cd54416523404d8fc4cd12a1d359a7b [^] => http://code.openbravo.com/retail/backports/3.0RR18Q4.3/org.openbravo.retail.posterminal/rev/d916a7d1a145bd2ade4f93640a1f944df645396c [^]
2019-04-10 15:27marvintmReview Assigned To => marvintm
2019-04-10 15:27marvintmStatusresolved => closed
2019-04-10 15:27marvintmFixed in Version => RR18Q4.3
2019-12-18 13:14maiteNote Added: 0116407

Notes
(0110962)
hgbot   
2019-04-02 10:22   
Repository: retail/backports/3.0RR18Q4.3/org.openbravo.retail.posterminal
Changeset: d916a7d1a145bd2ade4f93640a1f944df645396c
Author: Miguel de Juana <miguel.dejuana <at> openbravo.com>
Date: Tue Apr 02 10:21:33 2019 +0200
URL: http://code.openbravo.com/retail/backports/3.0RR18Q4.3/org.openbravo.retail.posterminal/rev/d916a7d1a145bd2ade4f93640a1f944df645396c [^]

Fixed issue 0040388: Two cash ups in local storage if the backoffice session is closed during the cash up

- If we do not synchronize the cashup during cashup process (because we lost the session and we need to login again), the cashup is processed when we login again. If we have to synchronize a Cashup during the login we will create 2 new cashups. One because the login process creates one if there is not a Cashup not processed and another one created by the postProcessFunction which creates a new cashup after synchronizing a cashup.
Just avoid to create a new Cashup in postProcessFunction if we already habe created a new one.
- Add a hook to be able to close till when synchronizing the cashup in the login process

---
M web/org.openbravo.retail.posterminal/js/login/model/login-model.js
---
(0116407)
maite   
2019-12-18 13:14   
Remember to apply session patch if enviroment requires it

http://code.openbravo.com/erp/pmods/org.openbravo.retail.sessions/rev/47f0e1cebf4fcbf04a82a5d31a6f1b4b9db0d6e7 [^] [^]