Openbravo Issue Tracking System - Retail Modules
View Issue Details
0048516Retail ModulesLoyalty Programs for Web POSpublic2022-02-02 15:332022-02-21 08:19
martinsdan 
ranjith_qualiantech_com 
normalmajoralways
closedfixed 
30Ubuntu 18.04.1 LTS
 
RR22Q1.1 
No
0048516: It is not possible to redeem points while doing a purchase
When doing a purchase, the system asks if the customer wants to burn points.
This should create and use a gift card.
The points are burned but an error is shown.

Also, the error message is missing in AD
https://watch.screencastify.com/v/P7R0DHwuW9yCVNqUREMi [^]

To Reproduce the issue in livebuilds pi
Code:
GiftCardModel.java consumeAmountGiftCard Line 267. Throw Some Exception

Backoffice:
Don't add Manual Earn Rule for "Automatic Loyalty Program Membership" under Earn Rules

1) Use Customer "STA Customer (Multi Subscription)"
2) Add product
3) Redeem the points
4) Error Occurred (due to "Manual Earn Rule" is not configured for "Automatic Loyalty Program Membership"). KO
5) But points consumed. - KO (Can be checked in Subscriptions tab under Business Partner).
To reuse the loyalty program "Automatic Loyalty Program Membership", reset the points (subscription points and earned points) under Business Partner in postgres

Same Case when removing gift certificate payment
CancelGiftCertificateAmount.java restorePoints Line 75. Throw Some Exception
1) Use Customer "STA Customer (Multi Subscription)"
2) Add product
3) Redeem the points
4) Gift Certificate payment line created.
5) Remove payment. Error should be shown. But its not shown. KO
6) Payment should not be removed until it was success in backoffice. Now, payment is removed before receiving the response from server. KO

For removing gift certificate payment, "Manual Earn Rule" should be added under Earn Rules for the Loyalty Program
The problem is in GiftCardModel.consumeAmountGiftCard when comparing the gift card organization with the current organization.
The current organization is the store but the gift card organization is the legal organization.
No tags attached.
related to defect 0048315 closed ranjith_qualiantech_com Gift certificate Burn Rule not working 
related to design defect 0048695 scheduled Retail Error when removing GiftCertificate payment created by redeeming points 
Issue History
2022-02-02 15:33martinsdanNew Issue
2022-02-02 15:33martinsdanAssigned To => Retail
2022-02-02 15:33martinsdanTriggers an Emergency Pack => No
2022-02-02 15:34martinsdanRelationship addedrelated to 0048315
2022-02-02 15:36martinsdanCategoryGift cards and gift vouchers => Loyalty Programs for Web POS
2022-02-03 07:27ranjith_qualiantech_comAssigned ToRetail => ranjith_qualiantech_com
2022-02-04 11:40ranjith_qualiantech_comStatusnew => scheduled
2022-02-07 12:29ranjith_qualiantech_comSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=23632#r23632
2022-02-08 06:25ranjith_qualiantech_comSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=23635#r23635
2022-02-08 06:29hgbotNote Added: 0134821
2022-02-08 06:35hgbotNote Added: 0134822
2022-02-18 06:31hgbotNote Added: 0135107
2022-02-21 08:19hgbotResolutionopen => fixed
2022-02-21 08:19hgbotNote Added: 0135154
2022-02-21 08:19hgbotStatusscheduled => closed
2022-02-21 08:19hgbotNote Added: 0135155
2022-03-01 11:40ranjith_qualiantech_comRelationship addedrelated to 0048695

Notes
(0134821)
hgbot   
2022-02-08 06:29   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.loyalty.burn.giftcertificate/-/merge_requests/6 [^]
(0134822)
hgbot   
2022-02-08 06:35   
Merge request closed: https://gitlab.com/openbravo/product/pmods/org.openbravo.loyalty.burn.giftcertificate/-/merge_requests/6 [^]
(0135107)
hgbot   
2022-02-18 06:31   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.loyalty.burn.giftcertificate/-/merge_requests/9 [^]
(0135154)
hgbot   
2022-02-21 08:19   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.loyalty.burn.giftcertificate/-/merge_requests/9 [^]
(0135155)
hgbot   
2022-02-21 08:19   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.loyalty.burn.giftcertificate [^]
Changeset: bc8819a7eeb6c0f929f266aac4cb1eb5d178f596
Author: Ranjith S R <ranjith@qualiantech.com>
Date: 08-02-2022 11:19:12
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.loyalty.burn.giftcertificate/-/commit/bc8819a7eeb6c0f929f266aac4cb1eb5d178f596 [^]

Fixed ISSUE-48516: Points should not be burned if Gift Certificate is not generated
* When redeeming points for Gift Certificate, points should not be consumed
  until the whole process of redeem is finished
* When removing Gift Certificate payment, payment line should not be removed
  until it was removed/revered from the backoffice

---
M src-db/database/sourcedata/AD_MESSAGE.xml
M src/org/openbravo/retail/loyalty/burn/giftcertificate/process/CancelGiftCertificateAmount.java
M src/org/openbravo/retail/loyalty/burn/giftcertificate/process/ConsumeGiftCertificateAmount.java
M web/org.openbravo.retail.loyalty.burn.giftcertificate/app/model/business-object/ticket/actions/RemovePaymentActionPreparation.js
M web/org.openbravo.retail.loyalty.burn.giftcertificate/js/util/giftCertificateUtils.js
---