Openbravo Issue Tracking System - POS2
View Issue Details
0055882POS2POSpublic2024-07-01 15:022024-08-11 17:55
lmonreal 
SABARINATH P 
highmajoralways
closedfixed 
5
 
24Q4 
No
0055882: Scaled Price discount generaring undefined (reading 'id')
If there is a scaled price discount configured with some products, and these products are not in the price list of the store POS triggers error:

Cannot read properties of undefined (reading 'id')

Is not possible to do anything unless cache is cleared.

See video from livebuilds:

https://drive.google.com/file/d/1REmDl6y_xAb2oXbPSdkUlnLVzxx4qjk5/view?usp=sharing [^]
1. Configure a scaled price for a product-> See all configuration in the video
https://drive.google.com/file/d/1REmDl6y_xAb2oXbPSdkUlnLVzxx4qjk5/view?usp=sharing [^]

2.Do a sale with this discount
3.Remove this product from the Price list of the store that you are going to test. Refresh data
4. Open POS and load an order that contains the discount
5. See POS shows error message and is not possible to exit unless cache is cleared

See video from livebuilds:

https://drive.google.com/file/d/1REmDl6y_xAb2oXbPSdkUlnLVzxx4qjk5/view?usp=sharing [^]
It does not matter if the product is in the price list of the store, the error should not be triggered.
No tags attached.
png ISSUE SCALED PRICE.png (227,166) 2024-07-01 15:02
https://issues.openbravo.com/file_download.php?file_id=19963&type=bug
png
Issue History
2024-07-01 15:02lmonrealNew Issue
2024-07-01 15:02lmonrealAssigned To => Retail
2024-07-01 15:02lmonrealFile Added: ISSUE SCALED PRICE.png
2024-07-01 15:02lmonrealTriggers an Emergency Pack => No
2024-07-01 15:05lmonrealSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=28177#r28177
2024-07-01 15:05lmonrealIssue Monitored: martinsdan
2024-07-04 09:08guilleaerStatusnew => acknowledged
2024-07-08 08:31SABARINATH PAssigned ToRetail => SABARINATH P
2024-07-08 08:31SABARINATH PStatusacknowledged => scheduled
2024-07-15 10:02hgbotNote Added: 0166958
2024-08-11 17:54hgbotResolutionopen => fixed
2024-08-11 17:54hgbotStatusscheduled => resolved
2024-08-11 17:54hgbotNote Added: 0167939
2024-08-11 17:54hgbotFixed in Version => 24Q4
2024-08-11 17:54hgbotNote Added: 0167940
2024-08-11 17:55javierRodriguezStatusresolved => closed

Notes
(0166958)
hgbot   
2024-07-15 10:02   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/2797 [^]
(0167939)
hgbot   
2024-08-11 17:54   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/2797 [^]
(0167940)
hgbot   
2024-08-11 17:54   
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2 [^]
Changeset: 69851d81915311ce2e343c6803aade35d542479d
Author: sabarinath palanisamy <sabarinath.palanisamy.ext@openbravo.com>
Date: 11-08-2024 15:54:35
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/commit/69851d81915311ce2e343c6803aade35d542479d [^]

Fixed ISSUE-55882: Validate products only if its included in Price list.

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