To find these records the following queries will need to be used
Find affected user-upgrades, this may include synced and synced records.
SQL:
select user_id, transaction_id, subscriber_id, purchase_request_id, cost_amount, sv_taxable_amount, sv_sales_tax
from xf_purchase_request
join xf_payment_provider_log on xf_payment_provider_log.purchase_request_key = xf_purchase_request.request_key
where xf_purchase_request.cost_amount != xf_purchase_request.sv_taxable_amount;
Go to xero, search for transaction_id and update each invoice to have the correct tax zone and tax rate. This will require removing the payment, editing the invoice and adding the payment again.
Patch syncable records:
SQL:
update xf_purchase_request
set sv_sales_tax = cost_amount - sv_taxable_amount
where xf_purchase_request.cost_amount != xf_purchase_request.sv_taxable_amount;
Run the invoice sync if outstanding items have been "stuck" due to errors.