The invoice template implements a column of dropdown list 'tax category' outside the print area, with which you can choose the tax category of the current invoicing item. Then, the invoice template looks for the proper tax rate set on the bottom of the invoice form, and calculates the tax for the current invoicing item.