Openbravo Issue Tracking System - Retail Modules
View Issue Details
0044000Retail ModulesLoyalty Programs for Web POSpublic2020-05-08 11:152020-05-15 09:35
leyre-iriarte 
ranjith_qualiantech_com 
highmajoralways
closedfixed 
5
 
RR20Q3 
marvintm
No
0044000: Display Logic does not work for standar loyalty fields
When checking 'displayLogic' for each component, only the new attributes are checked.
the standar attributes are assigned to a variable called 'fields'.
The next links shows where the problem is:
https://code.openbravo.com/erp/pmods/org.openbravo.retail.loyalty.programs/file/tip/web/org.openbravo.retail.loyalty.programs/js/view/subscription-create-form.js#l199 [^]
1. Add a display logic for a field, for example: OBRLP.UI.Subscriptions.CreateSubscriptionForm.prototype.fields.find(field => field.name === 'createSubCardNumber').displayLogic = function() {
      return false;
    };


2. Log in in the POS and try to simply create a loyalty program for a customer.
3. the function doesn't check the field, so the field is always displayed.
1. Concatenate the fields :
const fields = this.fields.concat(this.newAttributes);

2. Change the name of the array of the fields for "newAtributes":
https://code.openbravo.com/erp/pmods/org.openbravo.retail.loyalty.programs/file/tip/web/org.openbravo.retail.loyalty.programs/js/view/subscription-create-form.js#l99 [^]
No tags attached.
Issue History
2020-05-08 11:15leyre-iriarteNew Issue
2020-05-08 11:15leyre-iriarteAssigned To => Retail
2020-05-08 11:15leyre-iriarteResolution time => 1590098400
2020-05-08 11:15leyre-iriarteTriggers an Emergency Pack => No
2020-05-08 13:32ranjith_qualiantech_comAssigned ToRetail => ranjith_qualiantech_com
2020-05-11 08:27hgbotCheckin
2020-05-11 08:27hgbotNote Added: 0119725
2020-05-11 08:29ranjith_qualiantech_comStatusnew => scheduled
2020-05-12 08:24ranjith_qualiantech_comStatusscheduled => resolved
2020-05-12 08:24ranjith_qualiantech_comResolutionopen => fixed
2020-05-15 09:35marvintmReview Assigned To => marvintm
2020-05-15 09:35marvintmStatusresolved => closed
2020-05-15 09:35marvintmFixed in Version => RR20Q3

Notes
(0119725)
hgbot   
2020-05-11 08:27   
Repository: erp/pmods/org.openbravo.retail.loyalty.programs
Changeset: 7e29fb688725ac52c8cdb5e5f08cd2ad7ca81334
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Mon May 11 11:56:51 2020 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.loyalty.programs/rev/7e29fb688725ac52c8cdb5e5f08cd2ad7ca81334 [^]

Related to issue 44000 : Displaylogic should be executed for Loyalty Card fields

* Displaylogic should be executed for extra fields ans as well default fields

---
M web/org.openbravo.retail.loyalty.programs/js/view/subscription-create-form.js
---