Openbravo Issue Tracking System - Retail Modules
View Issue Details
0040387Retail ModulesWeb POSpublic2019-03-14 12:112019-06-17 18:41
ngarcia 
migueldejuana 
urgentmajoralways
closedfixed 
5
 
RR19Q1.2RR19Q1.2 
guilleaer
No
0040387: 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 => RR19Q1
2019-03-27 09:10plujanTarget VersionRR19Q1 => RR19Q1.1
2019-05-01 08:36marvintmTarget VersionRR19Q1.1 => RR19Q1.2
2019-06-17 09:17hgbotCheckin
2019-06-17 09:17hgbotNote Added: 0112805
2019-06-17 09:19migueldejuanaStatusscheduled => resolved
2019-06-17 09:19migueldejuanaResolutionopen => fixed
2019-06-17 18:41guilleaerReview Assigned To => guilleaer
2019-06-17 18:41guilleaerNote Added: 0112837
2019-06-17 18:41guilleaerStatusresolved => closed
2019-06-17 18:41guilleaerFixed in Version => RR19Q1.2

Notes
(0112805)
hgbot   
2019-06-17 09:17   
Repository: retail/backports/3.0RR19Q1.2/org.openbravo.retail.posterminal
Changeset: bacb8024577158e080366278c84f5a1713d0e57c
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Mon Jun 17 12:46:42 2019 +0530
URL: http://code.openbravo.com/retail/backports/3.0RR19Q1.2/org.openbravo.retail.posterminal/rev/bacb8024577158e080366278c84f5a1713d0e57c [^]

Related to issue 40387 : 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
---
(0112837)
guilleaer   
2019-06-17 18:41   
Remember to apply session patch if enviroment requires it

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