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

Parents
  • 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
  • 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();

    }
    });

Reply
  • 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();

    }
    });

Children
No Data