Openbravo Issue Tracking System - Retail Modules
View Issue Details
0051787Retail ModulesDiscounts and Promotionspublic2023-03-07 10:252023-05-22 13:34
noemieroussel 
ranjith_qualiantech_com 
normalmajoralways
closedfixed 
5
 
 
No
0051787: Buy X and get Y as gift and Free product per total amount : promotion is not display if the gift ia associated to another promot
With the two discounts types, Free product per total amount and Buy X and get Y, the behavior on the POS must be the following:

1. Gift is NOT added to the ticket before clicking on the pay button:

1.1 Automatic + Gift Reminder= No --> Discount screen is NOT open.

1.2 Automatic + Gift Reminder= Yes --> Discount screen is open but [*]

1.3 Optional + Gift Reminder= No --> Discount screen is NOT open.

1.4 Optional + Gift Reminder= Yes --> Discount screen is open but [*]

2. Gift is added to the ticket before clicking on the pay button:

2.1 Automatic + Gift Reminder= No --> Discount screen is NOT open.

2.2 Automatic + Gift Reminder= Yes --> Discount screen is NOT open.

2.3 Optional + Gift Reminder= No --> Discount screen is open.

2.4 Optional + Gift Reminder= Yes --> Discount screen is open.

However, when adding the same gift in two promotion from the mentioned types, the promotion is not trigger.


ggi: note https://issues.openbravo.com/view.php?id=51787#c147337 [^]

1. Go to the backoffice.

2. Go to the "Discounts and Promotion" window and create a new record.

3. Select the discount type "Free product per total amount" and add a gift X.

4. Select the discount type "Free product per total amount" and add the same gift X.

5. Go to the POS and add the eligible products to trigger the promotion.

6. See that only one of the two promotion is trigger.

7. Do the same process with Buy X and get Y as gift : select the discount type "Buy X and get Y as gift" and add a gift X.

8. Select the discount type "Buy X and get Y as gift" and add the same gift X.

9. Go to the POS and add the eligible products to trigger the promotion.

10. See that only one of the two promotion is trigger.


No tags attached.
Issue History
2023-03-07 10:25noemierousselNew Issue
2023-03-07 10:25noemierousselAssigned To => Retail
2023-03-07 10:25noemierousselTriggers an Emergency Pack => No
2023-03-07 16:36gorka_gilNote Added: 0147337
2023-03-07 16:37gorka_gilDescription Updatedbug_revision_view_page.php?rev_id=25639#r25639
2023-03-07 16:37gorka_gilSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=25641#r25641
2023-03-07 16:37gorka_gilStatusnew => acknowledged
2023-03-24 10:58marvintmSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=25756#r25756
2023-04-03 15:37radhakrishnanAssigned ToRetail => radhakrishnan
2023-04-03 15:38radhakrishnanStatusacknowledged => scheduled
2023-04-26 11:10hgbotNote Added: 0148912
2023-04-26 11:11hgbotNote Added: 0148913
2023-05-11 18:52aferrazAssigned Toradhakrishnan => Retail
2023-05-17 07:41ranjith_qualiantech_comAssigned ToRetail => ranjith_qualiantech_com
2023-05-22 13:33hgbotResolutionopen => fixed
2023-05-22 13:33hgbotStatusscheduled => closed
2023-05-22 13:33hgbotFixed in Version => 23Q3
2023-05-22 13:33hgbotNote Added: 0150063
2023-05-22 13:33hgbotNote Added: 0150064
2023-05-22 13:34hgbotNote Added: 0150065
2023-05-22 13:34hgbotNote Added: 0150066

Notes
(0147337)
gorka_gil   
2023-03-07 16:36   
The problem is having two identical promotions buy x gift y:
- any x any y
- max/min x = 1
- max/min y = 1
- automatic
- gift reminder
- apply only once

If adding to the ticket 2 x and the 2 y,
both promotions are added correctly

If adding to the ticket 1 x,
click on pay, ERROR: it only suggest one of the promotions

If adding to the ticket 2 x,
click on pay, add the suggested promotion,
back,
click on pay again, it suggest the second promotion

The problem looks related to the gift notification, looks like the engine is working correctly
(0148912)
hgbot   
2023-04-26 11:10   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/1725 [^]
(0148913)
hgbot   
2023-04-26 11:11   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts/-/merge_requests/99 [^]
(0150063)
hgbot   
2023-05-22 13:33   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/1725 [^]
(0150064)
hgbot   
2023-05-22 13:33   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2 [^]
Changeset: c4ffd6d952c6fee29f5907b1e43132af3e0020ef
Author: Radhakrishnan Seeman <radhakrishnan@qualiantech.com>
Date: 22-05-2023 15:28:17
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/commit/c4ffd6d952c6fee29f5907b1e43132af3e0020ef [^]

Fixed ISSUE-51787: Optional discounts should have higher priority
* When calculating optional discounts, current discounts should have higher priority

---
M web-jspack/org.openbravo.pos2/src/components/Discounts/FeaturedDiscount/FeaturedDiscountPanelGrid/FeaturedDiscountPanelGrid.jsx
M web-jspack/org.openbravo.pos2/src/components/Discounts/shared/OptionalDiscountsUtils.js
---
(0150065)
hgbot   
2023-05-22 13:34   
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts [^]
Changeset: 017a73bafa20a6d4b664ffec2ef8d12aa87c4463
Author: Radhakrishnan Seeman <radhakrishnan@qualiantech.com>
Date: 22-05-2023 15:32:16
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts/-/commit/017a73bafa20a6d4b664ffec2ef8d12aa87c4463 [^]

Related to ISSUE-51787: Optional discounts should have higher priority
* When calculating optional discounts, current discounts should have higher priority

---
M web/org.openbravo.retail.discounts/app/model/business-logic/discounts-engine/engine/optional-discount-engine.js
---
(0150066)
hgbot   
2023-05-22 13:34   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts/-/merge_requests/99 [^]