Openbravo Issue Tracking System - POS2
View Issue Details
0052464POS2POSpublic2023-05-16 16:482023-06-20 15:58
Lcazaux 
ranjith_qualiantech_com 
normalmajoralways
closedfixed 
5
 
 
No
0052464: [Promo] - Buy X Get Y - Maximum number of gifts is exceeded when X = 2, Min Y = 1, Max Y = 2
Type of promo : buy X get Y as a gift
Subtype : Here Buy Any X Get Any Y

Step 1: Definition of promotion:
X = 2
Min Y = 1
Max Y = 2

Step 2: Add two eligible products to the ticket, only one to two gifts can be selected among the possible gifts configured => Result OK

Step 3: Add a total of 4 eligible product to the ticket --> Result KO -->
The pop up indicates that 4 eligible products can be selected instead of 2 (number of gifts is equal to the number of eligible products bought)
Go to the backoffice,
- Configure a discount&promo type "Buy X get Y as gift"
- Products set as "only those defined"
- Sub type "Any X Any Y"
- Configure X= 2 ; Min Y = 1 ; and Max Y = 2
- Add 2 gift products in the subtab
- Add 1 elegible article in the subtab "Product"
- Apply once checked
- Gift reminder checked
- Activate it

Go to POS
- Add 4 elegible products to the cart
- Go to Payment and select the promo
--> The pop-up indicates that 4 gift products can be selected instead of 2 (set as the maximum)
If max Y = 2 then no matter how many eligible products X are in the cart, the gifted products should always be maximum 2 articles in total
FASH
png 2023-05-16_16h53_49.png (118,677) 2023-05-16 16:54
https://issues.openbravo.com/file_download.php?file_id=18535&type=bug
png

png 2023-05-16_16h54_55.png (185,211) 2023-05-16 16:55
https://issues.openbravo.com/file_download.php?file_id=18536&type=bug
png

png 2023-05-16_16h55_45.png (174,295) 2023-05-16 16:56
https://issues.openbravo.com/file_download.php?file_id=18537&type=bug
png
Issue History
2023-05-16 16:48LcazauxNew Issue
2023-05-16 16:48LcazauxAssigned To => Retail
2023-05-16 16:48LcazauxTriggers an Emergency Pack => No
2023-05-16 16:48LcazauxTag Attached: FASH
2023-05-16 16:54LcazauxFile Added: 2023-05-16_16h53_49.png
2023-05-16 16:55LcazauxFile Added: 2023-05-16_16h54_55.png
2023-05-16 16:56LcazauxFile Added: 2023-05-16_16h55_45.png
2023-05-16 16:56LcazauxDescription Updatedbug_revision_view_page.php?rev_id=26092#r26092
2023-05-24 11:26ranjith_qualiantech_comAssigned ToRetail => ranjith_qualiantech_com
2023-05-29 09:20ranjith_qualiantech_comStatusnew => scheduled
2023-05-31 04:22hgbotNote Added: 0150492
2023-06-20 15:58hgbotResolutionopen => fixed
2023-06-20 15:58hgbotStatusscheduled => closed
2023-06-20 15:58hgbotNote Added: 0151388
2023-06-20 15:58hgbotFixed in Version => RR23Q3
2023-06-20 15:58hgbotNote Added: 0151389

Notes
(0150492)
hgbot   
2023-05-31 04:22   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts/-/merge_requests/106 [^]
(0151388)
hgbot   
2023-06-20 15:58   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts/-/merge_requests/106 [^]
(0151389)
hgbot   
2023-06-20 15:58   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts [^]
Changeset: 8327e8f5e2be88b37d2c560800d28ab1d2d9aa9f
Author: Ranjith S R <ranjith@qualiantech.com>
Date: 20-06-2023 13:52:07
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts/-/commit/8327e8f5e2be88b37d2c560800d28ab1d2d9aa9f [^]

Fixed ISSUE-52464: BuyXGiftY chunk qty should be one if apply once is checked

---
M web/org.openbravo.retail.discounts/app/model/business-logic/discounts-engine/engine/rules/buy-x-gift-y-discount.js
---