You must register a Tax Callback class which is called for tax calculation on Invoice generation.
From Setup, enter Custom Settings in the Quick Find box and look for Config System Classes. Click Manage to see System properties. Edit System properties to add a Tax Callback Class.