Openbravo Issue Tracking System - POS2
View Issue Details
0050371POS2POSpublic2022-09-29 08:162022-10-03 16:16
alostale 
alostale 
normalmajorhave not tried
closedfixed 
5
 
 
No
0050371: optional discounts do not take into account CRM property conditions
When a discount is marked as optional and it defines a CRM property condition, this condition is not taken into account.
In an instance with org.openbravo.discounts.propertycondition module installed.
1. In BO create a new discount that:
 a. Applies to all products
 b. Has an optional filter with a CRM property condition
2. Log in POS2. ERROR (technical) -> In dev console check discountPropertyCRMFilters property in OB.Discounts.Pos.optionalRuleImpls object -> ERROR: it's an empty array but it should contain the CRM property that was defined
3. Create a ticket with anonymous user and pay it. ERROR -> the discount is proposed even if not applicable to the user
4. Create a ticket with a CRM user that does not satisfy the CRM filter defined in the discout and pay it -> ERROR: it's an empty array but it should contain the CRM property that was defined

No tags attached.
related to feature request 0049884 closed gorka_gil POS2 Implement semi-automatic discounts in pos2 
related to feature request 0049021 closed yogaskarnik Retail Modules Add support for discount filters that depend on CRM properties 
Issue History
2022-09-29 08:16alostaleNew Issue
2022-09-29 08:16alostaleAssigned To => Retail
2022-09-29 08:16alostaleTriggers an Emergency Pack => No
2022-09-29 08:17alostaleRelationship addedrelated to 0049884
2022-09-29 08:18alostaleRelationship addedrelated to 0049021
2022-09-29 08:19alostaleSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=24794#r24794
2022-09-29 08:30alostaleSummaryoptional discounts do not take into account CRM property condiftions => optional discounts do not take into account CRM property conditions
2022-09-29 08:32hgbotNote Added: 0141478
2022-09-29 08:34alostaleAssigned ToRetail => alostale
2022-09-29 10:58alostaleSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=24795#r24795
2022-10-03 16:16hgbotNote Added: 0141582
2022-10-03 16:16hgbotResolutionopen => fixed
2022-10-03 16:16hgbotStatusnew => closed
2022-10-03 16:16hgbotNote Added: 0141583

Notes
(0141478)
hgbot   
2022-09-29 08:32   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.discounts.propertycondition/-/merge_requests/9 [^]
(0141582)
hgbot   
2022-10-03 16:16   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.discounts.propertycondition/-/merge_requests/9 [^]
(0141583)
hgbot   
2022-10-03 16:16   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.discounts.propertycondition [^]
Changeset: 1f1a10a622b8c1911209186099b6b9211c49b8cc
Author: Asier Lostalé <asier.lostale@openbravo.com>
Date: 03-10-2022 14:16:09
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.discounts.propertycondition/-/commit/1f1a10a622b8c1911209186099b6b9211c49b8cc [^]

fixes BUG-50371: optional discounts don't take into account CRM properties

Optional discounts are cached in a different object than automatic
discounts, this object wasn't taken into account when crm properties
were added.

---
M web-jspack/org.openbravo.discounts.propertycondition/src/model/ticket/TicketExtension.js
M web-jspack/org.openbravo.discounts.propertycondition/src/model/ticket/__test__/TicketExtension.test.js
M web-jspack/org.openbravo.discounts.propertycondition/src/ob-init.js
---