Openbravo Issue Tracking System - Retail Modules
View Issue Details
0045175Retail ModulesWeb POSpublic2020-10-01 23:592020-11-18 13:58
gorka_gil 
gorka_gil 
highmajorN/A
closedfixed 
5
 
RR20Q4RR20Q4 
marvintm
No
0045175: Statistics included in cashup stopped working after moving the cashup to indexeddb
After move the cashup from websql to indexeddb, all the statistics included in cashup request stopped working, this included these statistics:
- Number Of Transitions to Online
- Number Of Logclient Errors
- Average Latency in ms
- Average Upload Bandwidth in KB/s
- Average Download Bandwidth in KB/s
In vbs-1 terminal:
- make a cashup just for start a clean new one
- in developer tools set network in offline
- make a new ticket
- restore the online in network
- click on menu and retry connection, so the pos notice the back to online
- create a new cashup

In backend:
- go to touchpoint vbs-1
- go to the sub tab: terminal history status
- open the most recent record

The field number of transitions to online is 0, which is wrong.
No tags attached.
blocks defect 0045173 closed gorka_gil Statistics included in cashup stopped working after moving the cashup to indexeddb 
Issue History
2020-10-02 13:22gorka_gilTypedefect => backport
2020-10-02 13:22gorka_gilTarget Version => RR20Q4
2020-11-18 13:33hgbotResolutionopen => fixed
2020-11-18 13:33hgbotStatusscheduled => resolved
2020-11-18 13:33hgbotFixed in Version => RR20Q4
2020-11-18 13:33hgbotNote Added: 0124486
2020-11-18 13:58marvintmReview Assigned To => marvintm
2020-11-18 13:58marvintmStatusresolved => closed

Notes
(0124486)
hgbot   
2020-11-18 13:33   
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal [^]
Changeset: 75f70c4a35641b0b06e82fbb302dc4b3c876f6e5
Author: Ranjith S R <ranjith@qualiantech.com>
Date: 2020-11-18T18:01:17+05:30
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/commit/75f70c4a35641b0b06e82fbb302dc4b3c876f6e5 [^]

Fixes ISSUE-45175: Fix statistics included in cashup

- after initCashup create localStore variables in case donot exists
- after each ticket, add the statistics to the cashup include in the ticket message
- when doing a cashup include the statistics in the message
- after do a cashup, reset the statistics

When moving the cashup to indexeddb most of the code is inside actions,
and edit the local storage variables cannot be done inside the actions,
so was needed some changes respect how it works before:
- previosly the variables reset was done on init cashup from backend or
  from scratch.
  Now, it is executed in all init cashups, but only set to 0 if the variable
  doesnot exist
- Before, the reset of variables where executed at the beggining of init cashup.
  Now, is executed only after the action has finish in the then of the promise returned
  by the action (for the case that the action was canceled)
- Before, when adding the network statistics to the cashup to send to backend, there was an
  if to check if the variable exists, now it is removed since in the init cashup we ensurei that exists.

---
M web/org.openbravo.retail.posterminal/app/model/business-object/cashup/Cashup.js
M web/org.openbravo.retail.posterminal/app/model/business-object/cashup/CashupUtils.js
M web/org.openbravo.retail.posterminal/app/model/business-object/cashup/actions/CompleteCashupAndCreateNew.js
M web/org.openbravo.retail.posterminal/app/model/business-object/cashup/actions/InitCashup.js
M web/org.openbravo.retail.posterminal/js/closecash/model/cashup/cashup-model.js
M web/org.openbravo.retail.posterminal/js/login/model/login-model.js
M web/org.openbravo.retail.posterminal/js/utils/ticketUtils.js
---