Calculation in custom script

I want to do some calculation based on field hours in custom doctype and save result in base field of custom doctype.
i wrote this custom script:

and still not getting expected result.

Instead of last tow rows


you can use the set_value function:
cur_frm.set_value('base', str(rate) );

this assign the value to the field and refresh it

1 Like