Openbravo Issue Tracking System - Retail Modules
View Issue Details
0042286Retail ModulesDiscounts and Promotionspublic2019-11-15 10:082019-12-02 09:00
samuel_nicuesa 
rqueralta 
highmajoralways
closedfixed 
5
 
RR20Q1 
guilleaer
No
0042286: Javascript error using Buy X pay Y of different product discount
Javascript error using Buy X pay Y of different product discount and Distribute Between Lines flag is active.

The Old discount engine should be active.

Web POS Use advanced discounts engine = true;
[BO]
-Configure the preference Web POS Use advanced discounts engine = N
-Configure Discount Buy X pay Y of different product
- Distribute Between Lines = active

[POS]
-Add some promotion product, the promotion will be added in the ticket.
-Add a MANUAL discount to the ticket : disc5_var_perc -5%
-You will see a Javascript error, It is happening because the amt for the first promotion is undefined.
No tags attached.
png 42286_JSError.png (233,015) 2019-11-15 10:12
https://issues.openbravo.com/file_download.php?file_id=13539&type=bug
png

png 42286_amtValue.png (95,915) 2019-11-15 10:12
https://issues.openbravo.com/file_download.php?file_id=13540&type=bug
png
Issue History
2019-11-15 10:08samuel_nicuesaNew Issue
2019-11-15 10:08samuel_nicuesaAssigned To => Retail
2019-11-15 10:08samuel_nicuesaResolution time => 1575586800
2019-11-15 10:08samuel_nicuesaTriggers an Emergency Pack => No
2019-11-15 10:12samuel_nicuesaFile Added: 42286_JSError.png
2019-11-15 10:12samuel_nicuesaFile Added: 42286_amtValue.png
2019-11-18 15:06rqueraltaAssigned ToRetail => rqueralta
2019-11-18 15:06rqueraltaStatusnew => scheduled
2019-11-23 14:33hgbotCheckin
2019-11-23 14:33hgbotNote Added: 0115780
2019-11-23 14:33hgbotStatusscheduled => resolved
2019-11-23 14:33hgbotResolutionopen => fixed
2019-11-23 14:33hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.discounts/rev/7cd4c382c64d3f316faeaaaf2da1ab22e36400df [^]
2019-12-02 09:00guilleaerReview Assigned To => guilleaer
2019-12-02 09:00guilleaerStatusresolved => closed
2019-12-02 09:00guilleaerFixed in Version => RR20Q1

Notes
(0115780)
hgbot   
2019-11-23 14:33   
Repository: erp/pmods/org.openbravo.retail.discounts
Changeset: 7cd4c382c64d3f316faeaaaf2da1ab22e36400df
Author: Rafael Queralta <rafaelcuba81 <at> gmail.com>
Date: Tue Nov 19 22:14:57 2019 -0500
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.discounts/rev/7cd4c382c64d3f316faeaaaf2da1ab22e36400df [^]

Fixed issue 42286: Javascript error using Buy X pay Y of different product discount

- Take into account the actualAmt value to prevent errors when the amt value is
undefined

---
M web/org.openbravo.retail.discounts/js/promotion-manual.js
---