Openbravo Issue Tracking System - Retail Modules
View Issue Details
0042490Retail ModulesDiscounts and Promotionspublic2019-12-09 13:402020-09-04 07:23
francisco 
ranjith_qualiantech_com 
normalmajoralways
closedfixed 
5
 
 
No
0042490: Discount and Promtions with Coupon doesn't show a message is you apply a coupon out of date range
If you apply a coupon out of date range the POs does not show any message, it should warn about the coupon is not valid
Tested in retail_modules-psql_pi:

In backoffice go to Discount and promotions and select the promo 'Coupon 10' and set an expired date
 Starting date= 01/01/2014,
 Ending Date=31/12/2014

Go to POS
Go to menu Coupon code
enter 'Coupon10'
Insert the product 'AVALANCHE TRANSCEIVER'

The promo is not applied but it should show a message warning us that the dates for the coupon has expired
It is difficult to fix the underlying problem in general, because only by executing the discounts engine we will know for sure if a discount can be applied or not.

However, we can at least add a basic filter in the remote request done to load a Coupon information, so that if the discount associated with it has an expiration date that doesn't comply with the current date, it can be immediately rejected at that point.

As part of this issue we will only fix this case. Other more complex cases (like discounts associated with specific customers or products) should be considered a feature request.
No tags attached.
Issue History
2019-12-09 13:40franciscoNew Issue
2019-12-09 13:40franciscoAssigned To => Retail
2019-12-09 13:40franciscoTriggers an Emergency Pack => No
2020-08-24 13:58marvintmProposed Solution updated
2020-08-24 13:58marvintmTypefeature request => defect
2020-08-24 13:58marvintmProposed Solution updated
2020-09-02 07:10ranjith_qualiantech_comAssigned ToRetail => ranjith_qualiantech_com
2020-09-03 04:47ranjith_qualiantech_comStatusnew => scheduled
2020-09-04 04:51hgbotNote Added: 0122623
2020-09-04 07:23hgbotNote Added: 0122630
2020-09-04 07:23hgbotResolutionopen => fixed
2020-09-04 07:23hgbotStatusscheduled => closed
2020-09-04 07:23hgbotNote Added: 0122631

Notes
(0122623)
hgbot   
2020-09-04 04:51   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts.coupons/-/merge_requests/3 [^]
(0122630)
hgbot   
2020-09-04 07:23   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts.coupons/-/merge_requests/3 [^]
(0122631)
hgbot   
2020-09-04 07:23   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts.coupons [^]
Changeset: cec7140682e3b197d6e2d767126c7189f7566748
Author: Ranjith S R <ranjith@qualiantech.com>
Date: 2020-09-03T07:56:54+05:30
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts.coupons/-/commit/cec7140682e3b197d6e2d767126c7189f7566748 [^]

Fixed ISSUE-42490: Added Date validation in Coupon Availability
* Added Discount Starting and Ending date validation when checking Coupon Availability

---
M src/org/openbravo/retail/discounts/coupons/CouponAvailability.java
---