Openbravo Issue Tracking System - Retail Modules
View Issue Details
0045494Retail ModulesCoupons OTFpublic2020-11-24 11:132021-06-09 11:37
wicherr 
ranjith_qualiantech_com 
normalmajoralways
closedfixed 
5
 
 
No
0045494: OTF rules expired continue to generate coupons
When an OTF rule is expired, even after till refresh (not full refresh),
the rule continues to generate coupons.

For information, the "refresh data" updated the ending date well in the web browser cache.
- Create a valid OTF rule
- Check on webPOS the rule generate a coupon
- Change the ending date to a previous date than today
- Refresh the terminal (menu > Refresh data)
- do the same ticket than previously

=> The coupon is still generated

To reproduce, I used the last version in livebuild with modules.
We need a fix on 20q3 for Norauto.
If the OTF rule is expired, the coupons should stop to be generated. A patch has been attached
NOR, NORAUTO
related to defect 0045885 closed ranjith_qualiantech_com OTF Rule generate cupons with products that are excluded. 
related to defect 0045495 closed prakashmurugesan88 Head settings of OTF rules doesn't work as expected 
patch OTF.patch (1,247) 2021-02-09 11:00
https://issues.openbravo.com/file_download.php?file_id=15308&type=bug
Issue History
2020-11-24 11:13wicherrNew Issue
2020-11-24 11:13wicherrAssigned To => Retail
2020-11-24 11:13wicherrTriggers an Emergency Pack => No
2020-11-24 11:13wicherrTag Attached: NOR
2020-11-24 11:13wicherrTag Attached: NORAUTO
2020-11-27 12:25AugustoMauchFile Added: issue45494.diff
2020-11-27 12:26AugustoMauchProposed Solution updated
2020-11-27 13:15rafarodaRelationship addedrelated to 0045495
2020-11-27 21:59rafarodaFile Deleted: issue45494.diff
2021-02-08 10:10rafarodaResolution time => 1614726000
2021-02-08 10:10rafarodaNote Added: 0126023
2021-02-08 10:11rafarodaNote Edited: 0126023bug_revision_view_page.php?bugnote_id=0126023#r22110
2021-02-08 10:11rafarodaIssue Monitored: rafaroda
2021-02-09 10:59cbrazierIssue Monitored: cbrazier
2021-02-09 10:59cbrazierIssue End Monitor: cbrazier
2021-02-09 11:00cbrazierFile Added: OTF.patch
2021-02-11 15:31rafarodaRelationship addedrelated to 0045885
2021-02-15 05:39ranjith_qualiantech_comAssigned ToRetail => ranjith_qualiantech_com
2021-02-15 11:44ranjith_qualiantech_comStatusnew => scheduled
2021-02-16 06:47hgbotNote Added: 0126114
2021-02-19 08:11hgbotResolutionopen => fixed
2021-02-19 08:11hgbotStatusscheduled => closed
2021-02-19 08:11hgbotNote Added: 0126190
2021-02-19 08:11hgbotNote Added: 0126191
2021-06-09 11:37sebastien_lironNote Added: 0129248

Notes
(0126023)
rafaroda   
2021-02-08 10:10   
(edited on: 2021-02-08 10:11)
Patch will be added by Christophe Brazier

(0126114)
hgbot   
2021-02-16 06:47   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts.coupons.otf/-/merge_requests/10 [^]
(0126190)
hgbot   
2021-02-19 08:11   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts.coupons.otf [^]
Changeset: 12e7571e2850182936edd9d3d8688e78a94ab798
Author: Ranjith S R <ranjith@qualiantech.com>
Date: 2021-02-15T17:00:58+05:30
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts.coupons.otf/-/commit/12e7571e2850182936edd9d3d8688e78a94ab798 [^]

Fixed ISSUE-45494: Filter Coupon Rule by Current Date
* Filter Coupon Rule by Current Date by comparing with starting date and ending date

---
M web/org.openbravo.retail.discounts.coupons.otf/js/utils.js
---
(0126191)
hgbot   
2021-02-19 08:11   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts.coupons.otf/-/merge_requests/10 [^]
(0129248)
sebastien_liron   
2021-06-09 11:37   
It might lake this line, since new Date () will take the current hour, etc ... now.setHours(0, 0, 0, 0);