AnsweredAssumed Answered

How to populate currency type based on Quotes for Quoted line item

Question asked by Sundar Kumar on Jan 15, 2020
Latest reply on Jan 20, 2020 by Sundar Kumar

When i am changing the Product Template Field from Quoted Line Item, Currency Type fields are getting populated automatically from Product Catalog record. But i want to display currency values based on Quotes module currency type.


For eg:

Quote Currency Type: € (EUR)

Product Catalog Currency Type: $ (USD)

When i am selecting product template field from quoted line item, it should always display the currency values in € (EUR)


I have done changes in custom/modules/Products/clients/base/fields/quote-data-relate/quote-date-relate.js file. But it's still showing Product Catalog currency type.



     extendsFrom: 'ProductsQuoteDataRelateField',
     initialize: function(options){
     this.model.on('change:product_template_name',this.triggeronChange, this);     

triggeronChange: function(){
          var self=this;
          var  attr = this.model.attributes,
          product_template_id = attr.product_template_id,//LineItem ID
          product_template_name = attr.product_template_name;//LineItem Name
     var Quotecurrency_id = self.context.parent.get('model').get("currency_id");
          var Quotebase_rate = self.context.parent.get('model').get("base_rate");
          if (self.model.get('id') == undefined) {