Openbravo Issue Tracking System - Retail Modules
View Issue Details
0040155Retail ModulesDiscount Matrix Managementpublic2019-01-23 11:572019-02-26 16:58
malsasua 
ranjith_qualiantech_com 
highmajoralways
closedfixed 
5
 
RR18Q4.2 
jorge-garcia
Production - Confirmed Stable
2018-02-05
RR18Q2
https://code.openbravo.com/erp/pmods/org.openbravo.retail.discounts/rev/e8a94369c01f [^]
No
0040155: Receipt with discounts can not be completed
with the module Discount Matrix Management, if one line is added with a discretionary discount, it is not possible to complete the receipt. When click in total button is done, error is returned:
Uncaught dodivide(): Divide by 0
POS:
. new receipt:
. add Avalanche Transceiver
. click discount button: add disc_fixed_5_euro
. click in total button

in cosole, error is returned:
Uncaught dodivide(): Divide by 0
Attached a possible fix
No tags attached.
blocks defect 0040007 closed ranjith_qualiantech_com Receipt with discounts can not be completed 
Issue History
2019-02-06 09:55jorge-garciaTypedefect => backport
2019-02-06 09:55jorge-garciaTarget Version => RR18Q4.2
2019-02-06 10:01jorge-garciaRegression date => 2018-02-05
2019-02-06 10:01jorge-garciaRegression introduced in release => RR18Q2
2019-02-06 10:01jorge-garciaRegression introduced by commit => https://code.openbravo.com/erp/pmods/org.openbravo.retail.discounts/rev/e8a94369c01f [^]
2019-02-12 15:02hgbotCheckin
2019-02-12 15:02hgbotNote Added: 0109729
2019-02-12 15:03hgbotCheckin
2019-02-12 15:03hgbotNote Added: 0109731
2019-02-12 15:03hgbotStatusscheduled => resolved
2019-02-12 15:03hgbotResolutionopen => fixed
2019-02-12 15:03hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/80f1109499f38e1f7d8a6123aead1ef6b126480c [^] => http://code.openbravo.com/retail/backports/3.0RR18Q4.2/org.openbravo.retail.posterminal/rev/82aed713b34f71a38a7f2ce269f0dad5fb04e248 [^]
2019-02-26 16:58jorge-garciaNote Added: 0110087
2019-02-26 16:58jorge-garciaStatusresolved => closed

Notes
(0109729)
hgbot   
2019-02-12 15:02   
Repository: retail/backports/3.0RR18Q4.2/org.openbravo.retail.discounts
Changeset: 718893993ae93431c4054ba777eeef8325ff46fe
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Tue Feb 12 19:30:58 2019 +0530
URL: http://code.openbravo.com/retail/backports/3.0RR18Q4.2/org.openbravo.retail.discounts/rev/718893993ae93431c4054ba777eeef8325ff46fe [^]

Related to issue 40155 : New attribute lineQtyOffer is added to promotion

* For MultiDiscount support, qtyOffer has been set as 0.
  But qtyOffer has been used in few modules to calculate custom discount.
  So new attribute "lineQtyOffer" is added to promotion which holds the value of line qty

---
M web/org.openbravo.retail.discounts/js/promotion-manual.js
---
(0109731)
hgbot   
2019-02-12 15:03   
Repository: retail/backports/3.0RR18Q4.2/org.openbravo.retail.posterminal
Changeset: 82aed713b34f71a38a7f2ce269f0dad5fb04e248
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Tue Feb 12 19:30:55 2019 +0530
URL: http://code.openbravo.com/retail/backports/3.0RR18Q4.2/org.openbravo.retail.posterminal/rev/82aed713b34f71a38a7f2ce269f0dad5fb04e248 [^]

Fixed issue 40155 : New attribute lineQtyOffer is added to promotion

* For MultiDiscount support, qtyOffer has been set as 0.
  But qtyOffer has been used in few modules to calculate custom discount.
  So new attribute "lineQtyOffer" is added to promotion which holds the value of line qty
  When spliting the line, lineQtyOffer is updated based on obdiscQtyoffer

---
M web/org.openbravo.retail.posterminal/js/model/order.js
---
(0110087)
jorge-garcia   
2019-02-26 16:58   
Code reviewed and tested