Invoice total displaying as zero

SOLVED

The total is displaying as zero in Invoice Data entry

I've written the script for the extension amount as follows. Can you pls clarify which column should be used to store the total?