Openbravo Issue Tracking System - Retail Modules
View Issue Details
0057875Retail ModulesLoyalty Programs for Web POSpublic2025-02-05 13:462025-02-20 06:51
ivazquez 
ivazquez 
highmajoralways
closedno change required 
5
pi 
pi 
guillermogil
No
0057875: Error in the calculation of total points when several API calls are made at the same time.
If through the API, we make several calls to add and subtract points to a business partner, and these EDL Requests that are created have the same Execution Date (which means that they were executed at the same time and not staggered as it should happen, leaving two seconds of difference between one and another), the calculation in the total points of this business partner will be incorrect.
-Create a Loyalty Program
-Through the POS, create a business partner and add it to the loyalty program.

Now, from the API, make two simultaneous calls, one adding and one subtracting points.
The idea is that the EDL Requests are executed at the same time, that is where the problem is reproduced.

The API used is the following:

/ws/org.openbravo.retail.api.ImportService/Subscription.

Then, compare the total points with the sum of the earned points and you will see that they differ.


Video reproducing the issue in livebuilds:

https://drive.google.com/file/d/1Uy2ADNArjlBzMEoGlnhRQ7CFw7sMxlxr/view?usp=sharing [^]
No tags attached.
jpeg 600bbb01-4594-4ba0-9002-1f610a95e1cc.jpeg (153,004) 2025-02-05 13:46
https://issues.openbravo.com/file_download.php?file_id=20854&type=bug
jpeg
Issue History
2025-02-05 13:46ivazquezNew Issue
2025-02-05 13:46ivazquezAssigned To => Retail
2025-02-05 13:46ivazquezFile Added: 600bbb01-4594-4ba0-9002-1f610a95e1cc.jpeg
2025-02-05 13:46ivazquezTriggers an Emergency Pack => No
2025-02-07 06:44guillermogilAssigned ToRetail => ivazquez
2025-02-07 06:44guillermogilStatusnew => acknowledged
2025-02-20 06:51guillermogilStatusacknowledged => scheduled
2025-02-20 06:51guillermogilReview Assigned To => guillermogil
2025-02-20 06:51guillermogilStatusscheduled => closed
2025-02-20 06:51guillermogilResolutionopen => no change required

There are no notes attached to this issue.