Openbravo Issue Tracking System - Retail Modules
View Issue Details
0040617Retail ModulesWeb POSpublic2018-11-26 14:422019-04-15 18:53
0040617: Shared payment methods: race condition when saving the slave cashup
When doing login into a slave of payment methods,
if go directly to the cashup it gives an error.

Looking into openbravo log can be seen that the cashup id is null, since the synchronization of the initial cachup done in the login still is not in the backend.

Looks like a race condition between the initial cashup and the runsynprocess to sync it to the backend.
After add the terminal log project it can be reproduced in the shared payment tests, for example:
I31822_SPMQuotationSharedPayments (in the api method restoreSPMCashups)
Ensure that initcashup has finish before launch the runsyncprocess.
No tags attached.
blocks defect 0039691 closed gorka_gil Shared payment methods: race condition when saving the slave cashup 
Issue History
2019-04-15 16:17gorka_gilTypedefect => backport
2019-04-15 16:17gorka_gilTarget Version => RR18Q4.3
2019-04-15 18:35hgbotCheckin
2019-04-15 18:35hgbotNote Added: 0111157
2019-04-15 18:35hgbotStatusscheduled => resolved
2019-04-15 18:35hgbotResolutionopen => fixed
2019-04-15 18:35hgbotFixed in SCM revision [^] => [^]
2019-04-15 18:53guilleaerReview Assigned Tomarvintm => guilleaer
2019-04-15 18:53guilleaerStatusresolved => closed
2019-04-15 18:53guilleaerFixed in Version => RR18Q4.3

2019-04-15 18:35   
Repository: retail/backports/3.0RR18Q4.3/org.openbravo.retail.posterminal
Changeset: 2093905bef726e9911aeeb8968a06eaf8143c2de
Author: Gorka Gil <gorka.gil <at>>
Date: Thu Apr 11 19:00:16 2019 +0200
URL: [^]

Fixed issue 40617: Fixed two problems with shared payment methods cashup synchronization:
- If terminal belonged to a hierarchy, initCashup and runsyncprocess were executed twice during login
- The synchronization of the cashup happened when the cashup hadn't yet been prepared to be synchronized

M web/org.openbravo.retail.posterminal/js/closecash/model/cashup-model.js
M web/org.openbravo.retail.posterminal/js/login/model/login-model.js