Openbravo Issue Tracking System - POS2
View Issue Details
0047614POS2POSpublic2021-06-24 15:592021-09-01 14:04
timothee_catteeuw 
adrianromero 
normalminorhave not tried
closedfixed 
5
 
TAPTAP 
No
0047614: JIRA 2124 - Axis C3 initialization start for every login
For every login to Webpos, Axis C3 initialization start, here there are 2 possible behaviors :
- If the AxisC3 init configuration was not done, an error message appears
--> that case has to be correctly managed if no AxiC3 is configured on the related touchpoint
- Otherwise Axis C3 initialization start and check every components related to payment methods

In both cases, this initialization has not to be done for each login, it is really annoying because that will waste cashier's time as soon as he want to use the till.

2 possibilities in order to avoid this behavior :
- launch the initialization just once a day (or less frequently)
--> ideally trough a parameter in channel touchpoint menu allowing to configure the time between 2 init
- launch the initialization in background mode. It will allow to use WebPOS but the card payment method will not be available in that case before finishing the process
Tested with a channel touchpoint correctly configured in Axis C3 terminal configuration available in the related menu on BO (cf. this doc http://wiki.openbravo.com/wiki/Retail:AXISC3_Payment_Provider [^])
- Host : localhost
- Port : 9518
- Terminal : 00000165
- Prints info checked
- interface : network

Log in WebPOS
The application launch an initialization of payment terminal
Log out
Login
The application launch an initialization of payment terminal
and so on.
The proposal is to continue executing the initialization in the login but only if the device has not been initialized in a period of X hours. X will be a value configured at POS terminal level. If value equals to 0 (the default to not to change the current behaviour), initialization will be executed in every login. A good configuration value to guarantee the initialization will be executed every day can be 16 hours instead of 24 hours to be sure that initialization will happen every day even if one day the cashier logs in some minutes before the previous day.

This way if for example, the configuration value is 16 hours, if the POS terminal logs in at 9:00am and executes the initialization, in the next logins during the day the initialization will not be executed. But if the cashier logs in after 1:00am of the day after, in that moment the initialization will be executed.

This solution must be implemented in the module org.openbravo.retail.asyncpayprovider. As this module is currently in charge of managing the initialization of the device. Now, the function isLoggedIn() is used to check whether the initialization is executed or not. And the flag is set to true in the login, and to false in the logout.

The idea is to add a new check and execute the initialization not only if !isLoggedIn() but also if the previous initialization has happened before than the number of hours configured, and then save the last time the initialization has been executed in the localstorage the same way the logged in flag is saved in the local storage. This way it can be checked when the last initialization has been executed.

Note that the loggedin flag must be set to true and stored whether the initialization has been executed or not.

Note also that there is a menu option to execute the initialization. Saving the last time initialization has been executed must be done in both cases no matter when the initialization happens, in the login, or executing the menu option. I mean the initialization process must be responsible of saving in the local storage the last time the initialization has been executed.

No tags attached.
blocks feature request 0047245TAP closed adrianromero JIRA 2124 - Axis C3 initialization start for every login 
Issue History
2021-09-01 14:03guilleaerTypefeature request => backport
2021-09-01 14:04guilleaerNote Added: 0131485
2021-09-01 14:04guilleaerStatusscheduled => resolved
2021-09-01 14:04guilleaerFixed in Version => TAP
2021-09-01 14:04guilleaerResolutionopen => fixed
2021-09-01 14:04guilleaerStatusresolved => closed

Notes
(0131485)
guilleaer   
2021-09-01 14:04   
https://gitlab.com/obcustomers/AGAP/org.openbravo.retail.axisc3/-/commit/ca94cd0deaa22a9fc1f7cc1bb4ed07c2d3cf56b5 [^]
https://gitlab.com/obcustomers/AGAP/org.openbravo.retail.asyncpayprovider/-/commit/e49c11bda9952381bfaf7dc50f52e5db7f2a81f1 [^]
https://gitlab.com/obcustomers/AGAP/org.openbravo.retail.asyncpayprovider/-/commit/5f76d0ec5854e2deff481d67aafa27b3a4b97213 [^]