VAT is calculated on the entire invoice value. The product can also be edited Changing the tax status and calculating it or not calculating it on a specific product or on the entire invoice.