Calculation in script


I have created a parent doctype as “COST TEMPLATE”

In this there are different sections say Sewing, Labels, Trims and Accessories.

I have created the script for 3 different section to get the sum of each fields available in the sections.

I am able to get the value of SUM1, SUM2, SUM3.

I want the total of 3 sections to be displayed in the TOTAL 2 field.

formula: TOTAL 2 = SUM1 + SUM2 + SUM3

I have created a custom script for the above formula,but is not working.

please help.

screenshots attached.

Thanks & Regards,