0.00 tax added for financial types with no tax account
Created by: agileware-fj
Steps to reproduce:
- Turn on Tax & Invoicing then set up a financial type with no tax account - call this e.g. "No Tax calculation"
- Create a contribution with a single line item using "No Tax calculation" as the financial type.
- Check the line items using SQL - tax_amount is NULL - correct
- Edit the Contribution and change a line item
- Note that tax_amount is 0.00 on this form.
- Check the line items using SQL - tax_amount is 0.00 - this causes problems with the invoice template ("% GST" with no number) and also account syncing with Xero, which will receive the full amount as tax exclusive (due to 0.00 as a string not being "empty") and add tax on top for accounts tax instead of calculating the percentage of the given amount which is already tax.
Ideal solution – When there is no tax account for the selected financial type,
- Tax amount field is should be hidden on the line item editor, and
- Saving the line item should result in the tax_amount column containing NULL
We can work on a solution for this if needed.