Openbravo Issue Tracking System - Retail Modules
View Issue Details
0051833Retail ModulesWeb POSpublic2023-03-13 06:252023-03-22 07:45
ranjith_qualiantech_com 
ranjith_qualiantech_com 
highmajoralways
closedfixed 
5
 
RR23Q2 
No
0051833: Discount API throws error if manualPromotions presents
When discount api is called with manualPromotions, then error occurs.
1) Open https://livebuilds.openbravo.com/retail_modules_pgsql_pi/api [^]
2) Choose "discounts" from dropdown
3) Click Tryit out
4) Paste the attached body "DiscountAPI_body.txt"
5) Click Execute

Response:
{
  "error": "TypeError: Cannot read property 'some' of undefined"
}
No tags attached.
txt DiscountAPI_body.txt (1,237) 2023-03-13 08:34
https://issues.openbravo.com/file_download.php?file_id=18250&type=bug
Issue History
2023-03-13 06:25ranjith_qualiantech_comNew Issue
2023-03-13 06:25ranjith_qualiantech_comAssigned To => ranjith_qualiantech_com
2023-03-13 06:25ranjith_qualiantech_comTriggers an Emergency Pack => No
2023-03-13 08:28ranjith_qualiantech_comStatusnew => scheduled
2023-03-13 08:34ranjith_qualiantech_comFile Added: DiscountAPI_body.txt
2023-03-14 08:04hgbotNote Added: 0147510
2023-03-22 07:45hgbotResolutionopen => fixed
2023-03-22 07:45hgbotStatusscheduled => closed
2023-03-22 07:45hgbotNote Added: 0147797
2023-03-22 07:45hgbotFixed in Version => RR23Q2
2023-03-22 07:45hgbotNote Added: 0147798

Notes
(0147510)
hgbot   
2023-03-14 08:04   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts/-/merge_requests/94 [^]
(0147797)
hgbot   
2023-03-22 07:45   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts/-/merge_requests/94 [^]
(0147798)
hgbot   
2023-03-22 07:45   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts [^]
Changeset: 708e28dca6224665e503fb2bef2fc48b588ad325
Author: Ranjith S R <ranjith@qualiantech.com>
Date: 22-03-2023 06:45:24
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts/-/commit/708e28dca6224665e503fb2bef2fc48b588ad325 [^]

Fixed ISSUE-51833: Discounts filters should be validated when applying discounts
* If discount filters are not present, then discount calculation should be continued

---
M web/org.openbravo.retail.discounts/app/model/business-logic/discounts-engine/engine/discount-rules.js
---