Caclucated Field in Quotes Module not Updating on QLI price change

I have caclucated Field in Quotes Module which is the rollup sum of two fields in the quoted line item called Mrc total and NRC total, When i edit a Quoted Line item , change the Product quanttiy or price and save , It updates the grand total but not Calculated Fields in Quotes , It get supdated when the page is refreshed

Here , you can see the MRC NRC total should be 300, It shows 200 but when i refresh the page It is update to 300

  • The calculated field on Quotes, from QLI to Quote itself (down -> top) follow the cascading:

    QLI -> Bundle -> Quote

    So you have to create the respective field on Bundle, make it calculated based on QLI and then make that field on Quote to be calculated based on Bundles.

    Regards

    André Lopes
    Lampada Global
    Skype: andre.lampada
  • Thank you for the reply Andre

    But, We cannot create a studio field on bundle, are you suggesting to create a field via code?

  • You just need to create the empty file modules/ProductBundles/metadata/studio.php and then go to Studio, you will be able to create custom fields on its.

    Regards

    André Lopes
    Lampada Global
    Skype: andre.lampada
  • Thanks Andre, I was'nt able to create a field in the bundles. So instead I extended "quote-data-group-list"  to custom/modules/ProductBundles/clients/base/views/quote-data-group-list/quote-data-group-list.js

    extendsFrom: 'ProductBundlesQuoteDataGroupListView',

    initialize: function (options) {


    this._super('initialize', [options]);
    },

    /**
    * Calling Parent Save method
    */
    onSaveRowEdit: function (rowModel) {

    // Parent save method

    this._super('onSaveRowEdit', [rowModel]);

    // Saving Quote model

    var quoteModel = this.context.get('parentModel');
    quoteModel.save();

    }
    });