Openbravo Issue Tracking System - Retail Modules
View Issue Details
0037462Retail ModulesWeb POSpublic2017-12-12 14:182018-01-30 13:09
malsasua 
ranjith_qualiantech_com 
normalmajorrandom
closedfixed 
5
 
RR18Q1 
marvintm
No
0037462: Error randomly with modules Discount rules for Retail by total and Discounts category for WebPOS
when installed the below two modules:
.Discount rules for Retail by total
.Discounts category for WebPOS

depends of order that the static resources are included in the whole javascript (randomly because the two modules have got the same dependencies), one error is returned:
Uncaught TypeError: Cannot read property 'model' of undefined
at Object.discountChanged (8a6fdaecf35207c14a5eff5c0b7f047f.js:75568)

In DiscountsUIPrototype.discountChanged, it requires to call to the function bind with arrguments, but it is called without arguments

. install the two modules
. in terminal, create a new ticket and apply a manual discount
see attachment
No tags attached.
related to defect 0037767RR18Q2 closed jorge-garcia Manual By Total Discounts are not applied with Discount Category module installed 
diff patchDiscByTotal.diff (912) 2017-12-12 14:18
https://issues.openbravo.com/file_download.php?file_id=11362&type=bug
Issue History
2017-12-12 14:18malsasuaNew Issue
2017-12-12 14:18malsasuaAssigned To => Retail
2017-12-12 14:18malsasuaFile Added: patchDiscByTotal.diff
2017-12-12 14:18malsasuaResolution time => 1515020400
2017-12-12 14:18malsasuaTriggers an Emergency Pack => No
2017-12-12 16:15malsasuaDescription Updatedbug_revision_view_page.php?rev_id=16429#r16429
2017-12-14 16:04ranjith_qualiantech_comAssigned ToRetail => ranjith_qualiantech_com
2017-12-14 16:04ranjith_qualiantech_comStatusnew => scheduled
2017-12-17 18:48hgbotCheckin
2017-12-17 18:48hgbotNote Added: 0101085
2017-12-17 18:48hgbotStatusscheduled => resolved
2017-12-17 18:48hgbotResolutionopen => fixed
2017-12-17 18:48hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.discounts.bytotal/rev/f47951bc013de1d45e60d4589bfe0f268210efed [^]
2017-12-19 18:15marvintmNote Added: 0101145
2017-12-19 18:15marvintmStatusresolved => new
2017-12-19 18:15marvintmResolutionfixed => open
2017-12-21 07:06ranjith_qualiantech_comStatusnew => scheduled
2017-12-21 07:19hgbotCheckin
2017-12-21 07:19hgbotNote Added: 0101177
2017-12-21 10:10ranjith_qualiantech_comStatusscheduled => resolved
2017-12-21 10:10ranjith_qualiantech_comResolutionopen => fixed
2017-12-22 11:40marvintmReview Assigned To => marvintm
2017-12-22 11:40marvintmStatusresolved => closed
2017-12-22 11:40marvintmFixed in Version => RR18Q1
2018-01-30 12:06jorge-garciaRelationship addedrelated to 0037767
2018-01-30 13:09hgbotCheckin
2018-01-30 13:09hgbotNote Added: 0102057

Notes
(0101085)
hgbot   
2017-12-17 18:48   
Repository: erp/pmods/org.openbravo.retail.discounts.bytotal
Changeset: f47951bc013de1d45e60d4589bfe0f268210efed
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Sun Dec 17 23:18:18 2017 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.discounts.bytotal/rev/f47951bc013de1d45e60d4589bfe0f268210efed [^]

Fixed issue 37462 : Bind arguments in discountChanged function

---
M web/org.openbravo.retail.discounts.bytotal/js/ticketdiscountExtension.js
---
(0101145)
marvintm   
2017-12-19 18:15   
It seems the fix still doesn't work correctly in the customer environment.
(0101177)
hgbot   
2017-12-21 07:19   
Repository: erp/pmods/org.openbravo.retail.discounts.bytotal
Changeset: 2f219563540021b25e9b44866de273e34dfd4ec1
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Thu Dec 21 11:49:21 2017 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.discounts.bytotal/rev/2f219563540021b25e9b44866de273e34dfd4ec1 [^]

Related to issue 37462 : Get Discount Rule from model instead of discount combo

* If discount bytotal and category module are present, discount combo will be overridden by button.
  So for duscount Rule, fetch it from model assigned to discountsContainer instead of combo.

---
M web/org.openbravo.retail.discounts.bytotal/js/ticketdiscountExtension.js
---
(0102057)
hgbot   
2018-01-30 13:09   
Repository: erp/pmods/org.openbravo.retail.discounts.category
Changeset: c0ad5b95fed35bd5e0b4c4b4d07c925fc298ebf0
Author: Jorge Garcia <jorge.garcia <at> openbravo.com>
Date: Tue Jan 30 11:01:37 2018 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.discounts.category/rev/c0ad5b95fed35bd5e0b4c4b4d07c925fc298ebf0 [^]

Related to issue 37462: Error randomly with modules Discount rules for
Retail by total and Discounts category for WebPOS

Discounts Category module uses now the hook OBPOS_preDiscountChangeHook
to implement the logic instead of extending the logic implemented in
posterminal module.

Fixed performance problem with the search of manual discounts in discount category
combo.

---
M web/org.openbravo.retail.discounts.category/js/discountsButton.js
---