Openbravo Issue Tracking System - Retail Modules
View Issue Details
0050974Retail ModulesDiscounts and Promotionspublic2022-11-23 09:472023-02-19 09:09
noemieroussel 
ranjith_qualiantech_com 
urgentmajoralways
closedfixed 
5
 
RR23Q2 
No
0050974: [PROMO]- Buy X Get Y - Promotion is not triggered if the list of eligible products contains a product with other promotion
In the WebPos,the promotion type “ Buy X and get Y as gift “ gift product has to be added manually to trigger the promotion, if the list of eligible products contains product(s) with other promotion / commercial operation

See video:
https://drive.google.com/file/d/1kaVE-A_cOSle7_8B_wC3IRlFE6fhDV5l/view?usp=sharing [^]
In the BackOffice, create 3 promotions, the "Buy X and get Y as a gift, the commercial operation in a product, the price adjustment promotion in a product

1 - Buy X and get Y as a gift promotion :

                Name : Test Product with promotions

                type : Buy X and get Y as gift

               Subtype : Buy Any X Gift Any Y

               Application Method : Optional

Add in the list of products :

Product : “ Alpine poles “

Product with Opecom : “Avalanche transceiver classic “

Product with price adjustment: “Base camp duffel 70 L “

Gift Product : “ Beer 0.5L ”


2-Commercial operation

In "Commercial operation window", create a new record.

Untick "summary level" and select "The White Valley Group Sale Price List" name it "OPERATION COMMERCIAL in one product" and save the record.

Search on the list for the product with searchkey: WVG/M0100 of Avalanche transceiver classic and put a 10 percent discount. Validate. Save the record.

3-Price adjustment promotion :

                Name : Test Price adjustment

                type : Price adjustment

               Discount: 10 percent

               Product: Base camp duffel 70 L

               Application Method : Automatic


4-Go to the webpos and create a new ticket. Add the product without promo "Alpine poles" and go to the payment -> See that the promotion "Test Product with promotions" is displayed.

5-Create a new ticket. Add the product with commercial operation "Avalanche transceiver classic" and go to payment --> KO see that the promotion "Test Product with promotions" is not display

6-Create a new ticket. Add the product with promotion "Base camp duffel 70 L" ..> KO see that the promotion "Test Product with promotions" is not display
Promotion should be triggered if the list of eligible products contains a product with other promotion if it's cumulative (Apply Next Discount ticked)
FASH
related to defect 0050893 closed Aaron_Alvarez POS2 Optional discounts with giftNotification gives error when navigating to order discounts 
Issue History
2022-11-23 09:47noemierousselNew Issue
2022-11-23 09:47noemierousselAssigned To => Retail
2022-11-23 09:47noemierousselTriggers an Emergency Pack => No
2022-11-23 09:47noemierousselTag Attached: FASH
2022-11-23 09:49noemierousselSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=25157#r25157
2022-11-23 11:01rafarodaPriorityhigh => urgent
2022-11-30 21:59rafarodaRelationship addedrelated to 0050893
2022-12-05 17:20noemierousselDescription Updatedbug_revision_view_page.php?rev_id=25212#r25212
2022-12-05 17:20noemierousselSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=25213#r25213
2022-12-12 16:18noemierousselTypedesign defect => defect
2022-12-13 14:25ranjith_qualiantech_comAssigned ToRetail => ranjith_qualiantech_com
2022-12-13 14:25ranjith_qualiantech_comStatusnew => scheduled
2022-12-19 05:44hgbotNote Added: 0144794
2023-02-19 09:09hgbotNote Added: 0146724
2023-02-19 09:09hgbotResolutionopen => fixed
2023-02-19 09:09hgbotStatusscheduled => closed
2023-02-19 09:09hgbotFixed in Version => RR23Q2
2023-02-19 09:09hgbotNote Added: 0146725

Notes
(0144794)
hgbot   
2022-12-19 05:44   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts/-/merge_requests/80 [^]
(0146724)
hgbot   
2023-02-19 09:09   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts/-/merge_requests/80 [^]
(0146725)
hgbot   
2023-02-19 09:09   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts [^]
Changeset: dd76be63bbf02e94c6cca785086eec005c3d543c
Author: Ranjith S R <ranjith@qualiantech.com>
Date: 19-02-2023 07:57:57
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts/-/commit/dd76be63bbf02e94c6cca785086eec005c3d543c [^]

Fixed ISSUE-50974: Available Qty should be fetched irrespective of discounts
* Available Qty should be calculated based on the Available products

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