Change total amount equation

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