Openbravo Issue Tracking System - Retail Modules | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0045074 | Retail Modules | Loyalty Programs for Web POS | public | 2020-09-16 18:15 | 2020-10-09 07:37 |
Reporter | aaroncalero | ||||
Assigned To | ranjith_qualiantech_com | ||||
Priority | high | Severity | major | Reproducibility | random |
Status | closed | Resolution | fixed | ||
Platform | OS | 5 | OS Version | ||
Product Version | |||||
Target Version | Fixed in Version | ||||
Merge Request Status | |||||
Review Assigned To | |||||
OBNetwork customer | |||||
Support ticket | |||||
Regression level | |||||
Regression date | |||||
Regression introduced in release | |||||
Regression introduced by commit | |||||
Triggers an Emergency Pack | No | ||||
Summary | 0045074: Random JS error after creating a customer | ||||
Description | When the Loyalty programs for WebPOS module is installed, sometimes after creating a customer a js error is raised. Remote mode for customers must be enabled. The error occurs when the customer is rendered in the ticket. A call is done to the server to refresh the subscription information, but it fails if the customer has not been created yet. | ||||
Steps To Reproduce | In an environment with Loyalty programs for WebPOS installed. Log in backend, go to the preference window and make sure that Enable remote for customers is defined with value Y Log in WebPOS Click on the Customer button > New Customer Add the required fields and click on Save. Finally assign the customer to the ticket. If the import entry processing is slow, the customer is assigned to the ticket, the refresh code is triggered, but since the customer is not present yet in the database, a null is returned to webpos, and the js error is raised | ||||
Proposed Solution | The code causing the issue is the function OBRLP.Util.refreshCustomer defined in the obrlputils.js file. After doing the remote find: OB.Dal.find(OB.Model.BusinessPartner, criteria, function(bps) { const bpRefresh = bps.at(0); callback(bpRefresh); }); It assumes that the bp will exist and calls the callback anyway. Two possible solutions: 1) Don't execute the callback if there is no customer 2) Check the points in code where OBRLP.Util.refreshCustomer is used (afaik there is just 1 call) and fix that code to prevent the js error if the bp is null. | ||||
Additional Information | |||||
Tags | No tags attached. | ||||
Relationships | |||||
Attached Files | |||||
Issue History | |||||
Date Modified | Username | Field | Change | ||
2020-09-16 18:15 | aaroncalero | New Issue | |||
2020-09-16 18:15 | aaroncalero | Assigned To | => Retail | ||
2020-09-16 18:15 | aaroncalero | Resolution time | => 1602021600 | ||
2020-09-16 18:15 | aaroncalero | Triggers an Emergency Pack | => No | ||
2020-10-05 12:50 | ranjith_qualiantech_com | Assigned To | Retail => ranjith_qualiantech_com | ||
2020-10-05 12:50 | ranjith_qualiantech_com | Status | new => scheduled | ||
2020-10-06 06:41 | hgbot | Note Added: 0123559 | |||
2020-10-09 07:37 | hgbot | Note Added: 0123633 | |||
2020-10-09 07:37 | hgbot | Resolution | open => fixed | ||
2020-10-09 07:37 | hgbot | Status | scheduled => closed | ||
2020-10-09 07:37 | hgbot | Note Added: 0123634 |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|