Openbravo Issue Tracking System - POS2
View Issue Details
0050154POS2POSpublic2022-09-05 11:532022-09-26 06:56
charlotte_vasseur 
ranjith_qualiantech_com 
highmajoralways
closedfixed 
5
 
22Q4 
No
0050154: [Promo] Cache problems in POS after changes in promotions
We have to log out/log in in POS or clean cache/history or open POS in private mode of the browser to see changes made on promotions
Refreshing masterdata in POS should be enough
In Backoffice, I created a store set with Vall Blanca Store (see Store set.png)
and this promotion 'Discount store set' with :
- active and starting 05-09-2022
- 'Included Product' = 'Only those defined'
- in ‘Product’ tab = product Hiking boots
- 'Included Organizations' = 'Only those defined'
- in ‘Organization’ tab, include store Vall Blanca (see Promo organization.png)
- 'Included Store Set' = 'All excluding defined'
- in 'Store Set' tab, add the previous store set (see Promo store set active.png)
- Discount amount = 8.50

Refresh master data in POS, the discount amount of the promotion is not applied for the product (OK - see POS Store + store set active.png)

In backoffice, select the previous promotion and deactivate the previous store set (see Promo store set deactivated.png)

Refresh master data in POS, the discount amount of the promotion is still not applied for the product (KO) when it should be (see POS Store + store set deactived KO.png)


=> If we log out and log in (or clean the cache and history of the browser, close and reopen POS - or open POS in a private mode window of the browser), then the promotion is well applied (see POS Store + store set deactived OK.png)
No tags attached.
related to defect 0049824 new Retail Discounts cache is not refreshed after changes in some related masterdata models 
png Store set.png (134,802) 2022-09-05 11:53
https://issues.openbravo.com/file_download.php?file_id=17470&type=bug
png

png Promo organization.png (188,688) 2022-09-05 11:53
https://issues.openbravo.com/file_download.php?file_id=17471&type=bug
png

png Promo store set active.png (188,420) 2022-09-05 11:53
https://issues.openbravo.com/file_download.php?file_id=17472&type=bug
png

png POS Store + store set active.png (114,168) 2022-09-05 11:53
https://issues.openbravo.com/file_download.php?file_id=17473&type=bug
png

png Promo store set deactivated.png (192,261) 2022-09-05 11:54
https://issues.openbravo.com/file_download.php?file_id=17474&type=bug
png

png POS Store + store set deactived KO.png (114,208) 2022-09-05 11:54
https://issues.openbravo.com/file_download.php?file_id=17475&type=bug
png

png POS Store + store set deactived OK.png (117,532) 2022-09-05 11:54
https://issues.openbravo.com/file_download.php?file_id=17476&type=bug
png
Issue History
2022-09-05 11:53charlotte_vasseurNew Issue
2022-09-05 11:53charlotte_vasseurAssigned To => Retail
2022-09-05 11:53charlotte_vasseurFile Added: Store set.png
2022-09-05 11:53charlotte_vasseurTriggers an Emergency Pack => No
2022-09-05 11:53charlotte_vasseurFile Added: Promo organization.png
2022-09-05 11:53charlotte_vasseurFile Added: Promo store set active.png
2022-09-05 11:53charlotte_vasseurFile Added: POS Store + store set active.png
2022-09-05 11:54charlotte_vasseurFile Added: Promo store set deactivated.png
2022-09-05 11:54charlotte_vasseurFile Added: POS Store + store set deactived KO.png
2022-09-05 11:54charlotte_vasseurFile Added: POS Store + store set deactived OK.png
2022-09-05 17:36caristuRelationship addedrelated to 0049824
2022-09-19 11:04ranjith_qualiantech_comAssigned ToRetail => ranjith_qualiantech_com
2022-09-19 11:04ranjith_qualiantech_comStatusnew => scheduled
2022-09-20 07:26hgbotNote Added: 0141232
2022-09-23 08:05hgbotNote Added: 0141313
2022-09-23 08:05hgbotResolutionopen => fixed
2022-09-23 08:05hgbotStatusscheduled => closed
2022-09-23 08:05hgbotFixed in Version => 22Q4
2022-09-23 08:05hgbotNote Added: 0141314
2022-09-26 06:56hgbotNote Added: 0141356

Notes
(0141232)
hgbot   
2022-09-20 07:26   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/1218 [^]
(0141313)
hgbot   
2022-09-23 08:05   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/1218 [^]
(0141314)
hgbot   
2022-09-23 08:05   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2 [^]
Changeset: d63a0522c94a38de0d7e323d9757e64d758613a8
Author: Ranjith S R <ranjith@qualiantech.com>
Date: 23-09-2022 06:05:25
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/commit/d63a0522c94a38de0d7e323d9757e64d758613a8 [^]

Fixed ISSUE-50154: Discount Cache should be updated when discount models are changed

---
M web-jspack/org.openbravo.pos2/src/core/discount/initDiscountsCache.js
---
(0141356)
hgbot   
2022-09-26 06:56   
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2 [^]
Changeset: 8cbdaad2b294ddba42a8303a2f5b0907bd54c660
Author: Ranjith S R <ranjith@qualiantech.com>
Date: 26-09-2022 10:20:50
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/commit/8cbdaad2b294ddba42a8303a2f5b0907bd54c660 [^]

Related to ISSUE-50154: Updated Jest test for DiscountCache Model Listener

---
M web-jspack/org.openbravo.pos2/src/core/discount/__test__/initDiscountsCache.test.js
---