Openbravo Issue Tracking System - Retail Modules
View Issue Details
0050361Retail ModulesWeb POSpublic2022-09-27 23:492022-09-28 23:25
AugustoMauch 
AugustoMauch 
normalmajorrandom
closedfixed 
5
 
RR22Q4 
No
0050361: Add a check to automatically restart a cashup if current one is already processed
We have detected that sometimes there is a problem with the state persistence and as a result after completing a cashup, the cashup that was just completed remains in the status of the application. Then, the next time the cashier logs in he will keep using that cashup, and he will end up with an error in the backend after trying to process a cashup that has already been processed.

We are still trying to find the root cause (state not being persisted properly), but in this issue we mean to prevent the duplicated cashup processing by checking if the user is working with a processed cashup and creating and in that case creating a new one
We are not able to reproduce the issue unless we:
- Increase the throttle of the state persistence from 100ms to 10s
- Remove the state persistence flush we do after each cashup completion

Doing that, if the user closes or refreshes the application right after completing the cashup, the completion will not be persisted and the next time the user logs in he will keep using the previous version of the cashup
No tags attached.
depends on backport 0050362RR22Q3.1 closed AugustoMauch Retail Modules Add a check to automatically restart a cashup if current one is already processed 
related to defect 0052052 closed AugustoMauch POS2 Reduce the number of times the state is persisted on disk 
Issue History
2022-09-27 23:49AugustoMauchNew Issue
2022-09-27 23:49AugustoMauchAssigned To => Retail
2022-09-27 23:49AugustoMauchTriggers an Emergency Pack => No
2022-09-27 23:49AugustoMauchAssigned ToRetail => AugustoMauch
2022-09-27 23:49AugustoMauchStatusnew => scheduled
2022-09-27 23:53hgbotNote Added: 0141427
2022-09-28 18:16hgbotNote Added: 0141457
2022-09-28 23:25hgbotResolutionopen => fixed
2022-09-28 23:25hgbotStatusscheduled => closed
2022-09-28 23:25hgbotNote Added: 0141459
2022-09-28 23:25hgbotFixed in Version => RR22Q4
2022-09-28 23:25hgbotNote Added: 0141460
2022-09-28 23:25hgbotNote Added: 0141461
2022-09-28 23:25hgbotNote Added: 0141462
2023-04-20 16:29malsasuaRelationship addedrelated to 0052052

Notes
(0141427)
hgbot   
2022-09-27 23:53   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/932 [^]
(0141457)
hgbot   
2022-09-28 18:16   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core/-/merge_requests/412 [^]
(0141459)
hgbot   
2022-09-28 23:25   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/932 [^]
(0141460)
hgbot   
2022-09-28 23:25   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal [^]
Changeset: fa6419f705344ddb90c4f0b45fb38f65e604c07c
Author: Augusto Mauch <augusto.mauch@openbravo.com>
Date: 28-09-2022 18:18:47
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/commit/fa6419f705344ddb90c4f0b45fb38f65e604c07c [^]

Fixes ISSUE-50361: Prevents duplicated cashup

In order to prevent a duplicated cashup if there has been a problem
persisting the last cashup completion, we will now detect the case when
the current cashup has already been processed in the backend, and in
that case we will start a new one from scratch in the backend.

---
M web/org.openbravo.retail.posterminal/app/model/business-object/cashup/actions/InitCashup.js
---
(0141461)
hgbot   
2022-09-28 23:25   
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core [^]
Changeset: b78c185814b1d2099f455740df582e6fc8e68fef
Author: Augusto Mauch <augusto.mauch@openbravo.com>
Date: 28-09-2022 18:17:30
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core/-/commit/b78c185814b1d2099f455740df582e6fc8e68fef [^]

Related to ISSUE-50361: Extracts TerminalLog.addLog to utility function

---
M web/org.openbravo.mobile.core/app/model/business-object/terminal-log/TerminalLogUtils.js
M web/org.openbravo.mobile.core/app/model/business-object/terminal-log/actions/AddLog.js
---
(0141462)
hgbot   
2022-09-28 23:25   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core/-/merge_requests/412 [^]