For calculating invoice level values you can you this function. Here we compute Total Tax amount, Total Taxable amount and Total invoice value at invoice level. Please note after calculation also this field is editable by the user.

Lite_Calculate invoice level values feature