Openbravo Issue Tracking System - Retail Modules
View Issue Details
0047572Retail ModulesDiscounts and Promotionspublic2021-08-19 14:532021-11-03 07:25
Sergio_Gomez 
ranjith_qualiantech_com 
normalmajoralways
closedfixed 
5
 
 
marvintm
No
0047572: Discounts which include or exclude certain characteristic values are not working properly
"All of the values defined" doesn't work like in the definition: http://wiki.openbravo.com/wiki/Retail:Discounts_and_Promotions_Rules#Discounts_which_include_or_exclude_certain_characteristic_values [^]

If Included Characteristics as “All of the values defined”, where discount should apply if ALL the characteristics are present in the product but it is never applied.

If Excluded Characteristics as “All of the values defined”, where only if ALL the characteristics are present in the product the discount should not be applied, but if one of the values is present in the product then the discount is not applied (works like Any of the ones defined).

"Any of the ones defined" works fine in both cases.
In https://livebuilds.openbravo.com/retail_mp_3.0RR21Q3 [^]

In the Product window set a test product (with "Is Generic" selected) and in the Price tab set a price.
In the Characteristics tab set two characteristics for the product (such as Diameter and Dynafit System, with "Variant" selected).
Press the "Manage Variants" button to create a variant of the product (for example the one with Dynafit System: Yes, Diameter: 7.3 mm).

In the Discounts and Promotions window set a test discount with Discount/promotion type = Price Adjustment, Starting Date and Included Characteristics = All of the values defined.
In the Include Characteristics tab set the two characteristics of the product.

In the Sales Order window create a new sale order with the product in the Lines tab.
Book the sale order and check that the discount hasn't been applied.

In the Excluded Characteristics repeat the last steps to check that All of the values defined doesn't apply the discount if any of the characteristic is defined instead of if all of the characteristics are defined.


See the attached images and an example video: https://drive.google.com/file/d/1QlWzAEZ5BefOD-PQukr5Gdgrn1U86c_8/view?usp=sharing [^]
No tags attached.
related to design defect 0051252 new Retail Openbravo ERP Different behavior for "Included Characteristics: All of the values defined" discount configuration in the ERP and in POS 
png product.png (127,588) 2021-08-19 14:54
https://issues.openbravo.com/file_download.php?file_id=16135&type=bug
png

png discount.png (165,330) 2021-08-19 14:54
https://issues.openbravo.com/file_download.php?file_id=16136&type=bug
png

png sale_order.png (181,402) 2021-08-19 14:54
https://issues.openbravo.com/file_download.php?file_id=16137&type=bug
png
Issue History
2021-08-19 14:53Sergio_GomezNew Issue
2021-08-19 14:53Sergio_GomezAssigned To => Retail
2021-08-19 14:53Sergio_GomezTriggers an Emergency Pack => No
2021-08-19 14:54Sergio_GomezFile Added: product.png
2021-08-19 14:54Sergio_GomezFile Added: discount.png
2021-08-19 14:54Sergio_GomezFile Added: sale_order.png
2021-08-19 14:57Sergio_GomezSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=23010#r23010
2021-08-19 15:35PracticsIssue Monitored: Practics
2021-09-02 17:39ranjith_qualiantech_comAssigned ToRetail => ranjith_qualiantech_com
2021-09-02 17:39ranjith_qualiantech_comStatusnew => scheduled
2021-09-07 03:37hgbotNote Added: 0131580
2021-09-08 08:00marvintmReview Assigned To => marvintm
2021-09-08 08:00marvintmNote Added: 0131632
2021-09-08 08:00marvintmStatusscheduled => closed
2021-09-08 08:00marvintmResolutionopen => no change required
2021-11-03 07:24hgbotNote Added: 0132802
2021-11-03 07:25hgbotResolutionno change required => fixed
2021-11-03 07:25hgbotFixed in Version => PR22Q1
2021-11-03 07:25hgbotNote Added: 0132803
2021-11-03 07:25marvintmNote Added: 0132804
2022-12-28 12:33aferrazRelationship addedrelated to 0051252

Notes
(0131580)
hgbot   
2021-09-07 03:37   
Merge Request created: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/428 [^]
(0131632)
marvintm   
2021-09-08 08:00   
The old discounts engine implementation based on PL functions in the backoffice is no longer supported since 19Q4 release, when the new discounts engine feature was introduced. All subsequent feature improvements, like the new characteristics filter, do not work there, and defects are no longer being fixed either.
(0132802)
hgbot   
2021-11-03 07:24   
Merge request merged: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/428 [^]
(0132803)
hgbot   
2021-11-03 07:25   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/openbravo [^]
Changeset: 6329dceefcd9ef6411738ce76480159b4e78026d
Author: Ranjith S R <ranjith@qualiantech.com>
Date: 2021-11-02T09:05:12+00:00
URL: https://gitlab.com/openbravo/product/openbravo/-/commit/6329dceefcd9ef6411738ce76480159b4e78026d [^]

Fixed ISSUE-47572: Updated Promotion Calculation for Characteristics
* Promotions should be calculated based on Include and Exclude Characteristics Configuration

---
M src-db/database/model/functions/M_PROMOTION_CALCULATE.xml
---
(0132804)
marvintm   
2021-11-03 07:25   
Finally, an implementation of a fix for this issue has been merged. The new Include and Exclude separate filters for Product characteristics in Discounts definition will now work in the backoffice flows.