Change total amount equation

i have created new fields in sales invoice which i need to add them to total amount formula how and where to do that?

Continues here How to change total amount calculations - #8 by Zeinab_Mohammed