Openbravo Issue Tracking System - Retail Modules
View Issue Details
0044578Retail ModulesWeb POSpublic2020-07-08 11:422020-07-20 12:32
AugustoMauch 
ranjith_qualiantech_com 
normalmajorhave not tried
closedfixed 
5
 
 
adrianromero
No
0044578: Deleting a receipt that contains a coupon consumes the coupon
If the webpos is configured to store deleted receipts, and a receipt containing a coupon is deleted, the coupon will be consumed.

This happens because the [1] PreOrderLoaderHookCoupons is not checking if the order has been deleted.

[1] https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts.coupons/-/blob/master/src/org/openbravo/retail/discounts/coupons/PreOrderLoaderHookCoupons.java#L23 [^]
In an environment with the org.openbravo.retail.discounts.coupons module installed:
- Configure the preference to store deleted receipts: Web POS Save Removed Tickets
- In the backend, configure a discount to be used with coupons, create a coupon
- In webpos, add some products to a ticket and then add the coupon created in the previous step.
- Remove the ticket, and check that the coupon status has been changed to Not Available
NOR
has duplicate defect 0044591 closed ranjith_qualiantech_com When a ticket with a coupon is deleted, the coupon is set a Not available 
Issue History
2020-07-08 11:42AugustoMauchNew Issue
2020-07-08 11:42AugustoMauchAssigned To => Retail
2020-07-08 11:42AugustoMauchResolution time => 1595368800
2020-07-08 11:42AugustoMauchTriggers an Emergency Pack => No
2020-07-08 11:42AugustoMauchTag Attached: NOR
2020-07-10 06:32ranjith_qualiantech_comAssigned ToRetail => ranjith_qualiantech_com
2020-07-13 07:45hgbotCheckin
2020-07-13 07:45hgbotNote Added: 0121402
2020-07-13 08:18ranjith_qualiantech_comStatusnew => scheduled
2020-07-14 18:20ranjith_qualiantech_comStatusscheduled => resolved
2020-07-14 18:20ranjith_qualiantech_comResolutionopen => fixed
2020-07-20 05:25ranjith_qualiantech_comRelationship addedhas duplicate 0044591
2020-07-20 12:32adrianromeroReview Assigned To => adrianromero
2020-07-20 12:32adrianromeroNote Added: 0121528
2020-07-20 12:32adrianromeroStatusresolved => closed

Notes
(0121402)
hgbot   
2020-07-13 07:45   
Repository: erp/pmods/org.openbravo.retail.discounts.coupons
Changeset: b417d170cb7beff7bd84aeca88575fc475ffd9a2
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Mon Jul 13 11:14:52 2020 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.discounts.coupons/rev/b417d170cb7beff7bd84aeca88575fc475ffd9a2 [^]

Related to issue-44578: Coupons should not be consumed when deleting the receipt

* With Pref. Save Removed Tickets is enabled, Coupons should not be processed/consumed
  when deleting the receipt with coupons

---
M src/org/openbravo/retail/discounts/coupons/PreOrderLoaderHookCoupons.java
---
(0121528)
adrianromero   
2020-07-20 12:32   
Reviewed