Openbravo Issue Tracking System - Retail Modules
View Issue Details
0045495Retail ModulesCoupons OTFpublic2020-11-24 11:372021-02-11 15:31
wicherr 
prakashmurugesan88 
highmajoralways
closedfixed 
5
 
 
No
0045495: Head settings of OTF rules doesn't work as expected
There are 2 ways to control an amount in the OTF settings :

1rst : in the header settings. Should control the receipt amount
2nd : in the product tab, should control the product line amount

Currently, if :
- I uncheck "is one coupon per transaction"
- I put for instance 100€ in minimum amount in the header

If I put 2 different products at 150€ for instance (so my receipt is at 300€) => 6 coupons are generated! (expected 3)

- Create an OTF rule with a minimum amount in header and uncheck "is one coupon per transaction"
- On webPOS, add several products which the prices are more than the minimum defined
- finalize the sale

=> The number of coupons generated is :
(total receipt amount)modulo(minimum defined) * (number of lines with price > minimum defined)
If the minimum amount is defined in the header of the rule, the amount checked should be ONLY the one of the ticket (taking into account the inclusions and exclusions for sure)

If the minimum amount is defined at product level of the OTF rule, the amounts checked should be the one of the products defined in this way.
NOR
related to defect 0045494 closed ranjith_qualiantech_com OTF rules expired continue to generate coupons 
related to defect 0045885 closed ranjith_qualiantech_com OTF Rule generate cupons with products that are excluded. 
Issue History
2020-11-24 11:37wicherrNew Issue
2020-11-24 11:37wicherrAssigned To => Retail
2020-11-24 11:37wicherrTriggers an Emergency Pack => No
2020-11-24 11:37wicherrTag Attached: NOR
2020-11-24 11:37wicherrTag Attached: NORAUTO
2020-11-24 11:41wicherrNote Added: 0124581
2020-11-24 11:58rafarodaTag Detached: NORAUTO
2020-11-24 17:18marvintmResolution time => 1607382000
2020-11-25 05:10prakashmurugesan88Assigned ToRetail => prakashmurugesan88
2020-11-26 11:41hgbotNote Added: 0124629
2020-11-26 11:41prakashmurugesan88Statusnew => scheduled
2020-11-27 08:58hgbotNote Added: 0124644
2020-11-27 08:58hgbotResolutionopen => fixed
2020-11-27 08:58hgbotStatusscheduled => closed
2020-11-27 08:58hgbotNote Added: 0124645
2020-11-27 13:15rafarodaRelationship addedrelated to 0045494
2021-02-11 15:31rafarodaRelationship addedrelated to 0045885

Notes
(0124581)
wicherr   
2020-11-24 11:41   
In the same vein, for instance, if I put in the basket 2 different products at 60€ (so my basket is 120€) and 100€ is defined in the OTF header and "is one coupon per transaction" is unchecked, then 0 coupon is generated (expected 1)
(0124629)
hgbot   
2020-11-26 11:41   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts.coupons.otf/-/merge_requests/4 [^]
(0124644)
hgbot   
2020-11-27 08:58   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts.coupons.otf/-/merge_requests/4 [^]
(0124645)
hgbot   
2020-11-27 08:58   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts.coupons.otf [^]
Changeset: c9ac4efa19a7c1fb3e4929106d9a42a1a289681d
Author: Prakash M <prakash@qualiantech.com>
Date: 2020-11-26T11:15:59+05:30
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts.coupons.otf/-/commit/c9ac4efa19a7c1fb3e4929106d9a42a1a289681d [^]

Fixed BUG-45495: Fixes no of coupons generated when minimum amount is defined in the header of the rule

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