Changing tax function to entire order

I want to move the tax selection to the bottom of the invoice and remove it from each line item. This would then just apply tax to subtotal and spit out the total, similar to how the shipping tax currently works. Picture attached as to what i am attempting to achieve. I think i can figure out most of it, im just not sure where i would add the code for the function to apply the tax amount to the subtotal. And then have the original tax field and total field add the new tax field. Using Version 7.5.1