lafi-business-group / lafi-sa.issues

Issue only repo for public. Please report all issues of lafi-sa.com in this repo
https://www.lafi-sa.com
0 stars 0 forks source link

[bonusPoints] :: Even when target points completed, maturity condition list shows red #12

Closed azharakbar closed 4 years ago

azharakbar commented 4 years ago

Describe the bug When a user's bonusPoints gets converted to redeemable points, then Target Point point achievement item in maturity condition list view, is displayed in red as if it is not completed

To Reproduce Steps to reproduce the behavior: [This can be reproduced by dev only]

  1. Clear all orders and bonus details
  2. Place required_number_of_orders with high grand totals
  3. Deliver and close all the orders
  4. Now check the bonus points window of the user
  5. 2nd item in the maturity condition list will be green
  6. Now do a forceful Transfer To E-Wallet procedure
  7. Now check the bonus points window of the user
  8. But not, the 2nd Item in the maturity condition list will be red

Expected behavior In step 8, the 2nd Item in the maturity condition list must be green since he have completed that maturity condition, without which, the user's transfer to e-wallet option would not have been completed successfully

Screenshots Actual (when running step 7 and 8) image

Expected (when running step 7 and 8) image

azharakbar commented 4 years ago

Reproduced in local environment

azharakbar commented 4 years ago

RCA While calculating the points actually achieved, it was considering the points_in_Q But in the case of all points transferred to e-wallet user, there wont be points_in_Q since all the points have been transferred Hence, the points achieved value will be sent as 0 to the client as a part of API request

Fix While calculating achieved points, sum up the points in all three baskets

azharakbar commented 4 years ago

After fix, (when running step 7 and 8)

image