You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I find that a lot of my invoices can't be voided as I keep hitting an error such as The line total 2098.30 does not match the expected line total 2098.36.
No payments have been applied to these invoices.
I thought perhaps the CSV exported by Xero had some mismatched totals, but after taking a look at your code and the Xero API documentation, I can see only the invoice number and status is being posted in the API call.
Have you happened to run into an issue like this? I have no issues deleting these invoices manually. 🤦♂️
Thanks!
The text was updated successfully, but these errors were encountered:
The errors are occurring due to a validation being performed, the invoices in question have a discount on some line items, this is being validated against the DiscountRate field (instead of the DiscountAmount field) as such the rounding is different.
To workaround the issue:
Make a GET call to the invoices endpoint to retrieve the invoice.
From each LineItem change the "DiscountRate" field to 0
Hey Leslie,
Thanks for this, very much appreciated.
I find that a lot of my invoices can't be voided as I keep hitting an error such as
The line total 2098.30 does not match the expected line total 2098.36
.No payments have been applied to these invoices.
I thought perhaps the CSV exported by Xero had some mismatched totals, but after taking a look at your code and the Xero API documentation, I can see only the invoice number and status is being posted in the API call.
Have you happened to run into an issue like this? I have no issues deleting these invoices manually. 🤦♂️
Thanks!
The text was updated successfully, but these errors were encountered: