How to set total, discount,subtotal, grand total in Quotes to read-only

I have found that those values are editable in the Edit view which I found a bit inconsistent because it can lead to further errors,e.g. when printing a template.

I have tried with creating a file custom\Extension\modules\AOS_Quotes\Ext\Vardefs\ sugarfield_total_amount.php

$dictionary['AOS_Quotes']['fields']['total_amount']['type'] = 'readonly';

but it does not work

go to ur your custom/modules/Aos_Quotes/metadata/editviewdefs.php

1 => 
          array (
            'name' => 'total_amount',
            'label' => 'LBL_TOTAL_AMOUNT',
            'displayParams' => 
            array (
              'field' => 
              array (
                'readonly' => 'readonly',
              ),
            ),
          ),

dispaly params this portion you have to add in ur code.

'displayParams' => 
            array (
              'field' => 
              array (
                'readonly' => 'readonly',
              ),
            ),

and repair once. it will work for you as u need.
cheers.

2 Likes

Many thanks! It works!

Always welcome . :cheer: