Update Grand total on custom field line item change - Quote Sugar 7.9

I want to add change event to my custom field selling_price_c. If user change the selling price amount from quotes create page, then grand total group amount should have to change. I am not able to find out the change event for discount_price field. 

Please check the attached screen shot.

Thanks

  • Hi dheeraj meghe 

    You have to create an extended vardefs on ProductBundles module in order to update the formula for field "total" in the ProductBundles module.

    The Total of Quote will be automatically updated on changing your custom field in Products module.

    Regards

    André Lopes
    Lampada Global
    Skype: andre.lampada
  • Thanks Andre Lopes for reply. 

    Could you please elaborate more on code wise, that how can update group total and grand total. 

    Also can you tell me from where $total and $subtotal coming in the vardef file.

    'total_usdollar' => array(
    'name' => 'total_usdollar',
    'vname' => 'LBL_TOTAL_USDOLLAR',
    'type' => 'currency',
    'len' => '26,6',
    'disable_num_format' => true,
    'comment' => 'Total amount for all items in the group in USD',
    'studio' => array(
    'mobile' => false,
    ),
    'readonly' => true,
    'is_base_currency' => true,
    'related_fields' => array(
    'currency_id',
    'base_rate'
    ),
    'formula' => 'ifElse(isNumeric($total), currencyDivide($total, $base_rate), "")',
    'calculated' => true,
    'enforced' => true,
    ),
    'subtotal_usdollar' => array(
    'name' => 'subtotal_usdollar',
    'vname' => 'LBL_SUBTOTAL_USDOLLAR',
    'type' => 'currency',
    'len' => '26,6',
    'disable_num_format' => true,
    'comment' => 'Group total minus tax and shipping in USD',
    'studio' => array(
    'mobile' => false,
    ),
    'readonly' => true,
    'is_base_currency' => true,
    'related_fields' => array(
    'currency_id',
    'base_rate'
    ),
    'formula' => 'ifElse(isNumeric($subtotal), currencyDivide($subtotal, $base_rate), "")',
    'calculated' => true,
    'enforced' => true,
    ),

    Thanks,

    Dheeraj M