Openbravo Issue Tracking System - Retail Modules
View Issue Details
0051876Retail ModulesWeb POSpublic2023-03-15 21:082023-04-03 06:58
sofidossant 
ranjith_qualiantech_com 
highmajoralways
closedfixed 
5
RR20Q3.1 
 
No
0051876: Error when using Coupons and sending by Email
When I use a coupon, on 2 tickets, I finish one and then try to finish the other, we see the email popup, and the popup where it tells us that the coupon has been used, but when I exit, the screen frizes.
Step to reproduce :
1 - Create new coupon
2 - Scan an article, scan coupon then pay ticket with any method payment
3 - Click in "New receipt" button, scan an article, scan the same coupon then pay ticket with any method payment then finalize ticket
4 - Remain the first ticket (step 2), finalize ticket, you have message popup "The following coupons have already been used", click on button "Remove coupon from ticket" then choose sending method (mail or print)
5 - WebPOS freezes in grey screen
The problem is that both controls use the pre order save hook.
In version 22q1 of send email, this was changed, and the hook was removed.
In this commit:

https://gitlab.com/openbravo/devel/pmods/org.openbravo.retail.sendemail/-/commit/759baf7b0701f96e697371900ec206d2dc5bc098 [^]

We could make a backport.
No tags attached.
Issue History
2023-03-15 21:08sofidossantNew Issue
2023-03-15 21:08sofidossantAssigned To => Triage Platform Conn
2023-03-15 21:08sofidossantTriggers an Emergency Pack => No
2023-03-20 09:38marvintmAssigned ToTriage Platform Conn => Retail
2023-03-20 09:38marvintmCategoryWeb POS Hardware Manager => Web POS
2023-03-27 08:13ranjith_qualiantech_comAssigned ToRetail => ranjith_qualiantech_com
2023-03-27 08:13ranjith_qualiantech_comStatusnew => scheduled
2023-03-27 16:36ranjith_qualiantech_comNote Added: 0147993
2023-03-27 16:36ranjith_qualiantech_comStatusscheduled => closed
2023-03-27 16:36ranjith_qualiantech_comResolutionopen => no change required
2023-03-29 20:59sofidossantNote Added: 0148075
2023-03-29 21:00sofidossantStatusclosed => new
2023-03-30 07:10ranjith_qualiantech_comStatusnew => scheduled
2023-03-30 15:22ranjith_qualiantech_comNote Added: 0148121
2023-03-31 12:44hgbotNote Added: 0148157
2023-04-03 06:58hgbotNote Added: 0148173
2023-04-03 06:58hgbotResolutionno change required => fixed
2023-04-03 06:58hgbotStatusscheduled => closed
2023-04-03 06:58hgbotNote Added: 0148174

Notes
(0147993)
ranjith_qualiantech_com   
2023-03-27 16:36   
Attached patch for 20Q3
(0148075)
sofidossant   
2023-03-29 20:59   
With the patch the WebPOS freezes in grey screen

1 - Create new coupon
2 - Scan an article, scan coupon then pay ticket with any method payment
3 - Click in "New receipt" button, scan an article, scan the same coupon then pay ticket with any method payment then finalize ticket
4 - Remain the first ticket (step 2), finalize ticket, you have message popup "The following coupons have already been used",
by mistake I click outside the windows instead of :
click on button "Remove coupon from ticket"
5 - then choose sending method (mail or print)
6 - after that the WebPOS freezes in grey screen

Then I made the same test and at Step 4
- I Clicked on the button "Remove coupon from ticket "
 - then print
the Webpos freezes in grey screen
(0148121)
ranjith_qualiantech_com   
2023-03-30 15:22   
Steps to reproduce in livebuilds
Backoffice
1) Create price adjustment discount and add coupon code (with expire after 1 use)
POS
1) Add product, Apply coupon code (Do not complete it)
2) Create new receipt, Add product, Apply same coupon code, complete it
3) Select receipt from step 1
4) Complete the receipt
5) Popup will be shown. (Coupon can't be used)
If user click "Remove coupon from ticket", receipt scan should be shown. Since, receipt will be recalculated and gross will be changed due to removing coupons.
(0148157)
hgbot   
2023-03-31 12:44   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts.coupons/-/merge_requests/18 [^]
(0148173)
hgbot   
2023-04-03 06:58   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts.coupons/-/merge_requests/18 [^]
(0148174)
hgbot   
2023-04-03 06:58   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts.coupons [^]
Changeset: c490b98fdfd755cc708184f998e0edd0e740bba8
Author: Ranjith S R <ranjith@qualiantech.com>
Date: 31-03-2023 11:10:16
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts.coupons/-/commit/c490b98fdfd755cc708184f998e0edd0e740bba8 [^]

Fixed ISSUE-51876: Receipt scan tab should be shown when coupon is removed
* When completing the ticket, coupon is already processed, then
  coupon should be removed from ticket and receipt scan tab should be shown
* AutoDismiss option should be removed from remove coupon from ticket popup

---
M web/org.openbravo.retail.discounts.coupons/js/hooks/preordersavehook.js
M web/org.openbravo.retail.discounts.coupons/js/utils/utils.js
---