Xero - common errors
The client SHOULD NOT delete the invoice in Xero if they find any mistakes in the amounts. They only need to re-export the Expedo invoice.
Deleting the invoice in Xero will cause an error during re-export and it will require the dev to resolve it in the backend.
The contact name already exists. Please enter a different contact name
Cause
Host/Worker is linked to a Xero contact (XeroID = xero contact ID)
The client creates a new contact in Xero (different XeroID)
The client renames the Expedo company with the same name as the new contact (note: the company is still linked to the first contact)
Error occurs when the client exports the invoice/rcti.
Fix
Fix is to set the client/employee table XeroID to null
Permanent fix has been pushed to v3 in https://expedo.atlassian.net/browse/TTBP-595
Invalid company info
Cause
User authenticated to a Xero account whose organization name does not match the Expedo company name
Related tickets
Fix
Re-authenticate and select the correct Xero organization (if the user has multiple organizations)
Edit the Expedo company name to match the Xero organization’s name
XeroExpedo
The contact with the specified contact details has been archived. The contact must be un-archived before creating new invoices or credit notes.
Cause
The Xero contact that the host is linked to has been archived
Fix
Have the client unarchive the contact before exporting the invoice
Or create a new contact record in Xero
Invoice # must be unique
Cause
There is an invoice in Xero with the same invoice # as the Expedo invoice the user is trying to export (created manually in Xero or exported from another invoice with the same number)
Fix
Either void the Expedo invoice and create a new one for export
Or update the Xero invoice’s invoice number before exporting the invoice in Expedo
Invoice not of valid status for modification
Cause
The invoice has either been archived, voided, awaiting payment or paid in Xero
In this case, we cannot edit the Xero invoice anymore
Fix
Void the invoice in Expedo and create a new one for export (for archived, voided or paid invoices in Xero)
For invoices that are confirmed exported to Xero with an awaiting payment status, just inform the client to manually update the invoice status to Exported in Expedo
Error: unauthorized_client : Unknown client or client not enabled
Cause
Xero is not yet enabled for the client’s Expedo instance
Related ticket
Fix
Devs must set up the client in the Xero Developer account first before they can use Xero.
Xero API minute rate limit error calling GetContacts
Cause
According to Xero’s documentation, there is a limit of 60 API calls per minute.
Related ticket
Fix
Ask the client to re-export the invoice after 1 minute when they get this error. This is a temporary fix while working on a permanent solution.
The TaxType code ‘OUTPUT' cannot be used with the account code '<code>’.
Cause
The account code used is not the registered revenue/income code in their Xero settings. Possibly, it is for Expense only.
Fix
Inform the client to use the account code registered as revenue/income in their Xero settings and not the expense code.
Unable to export to Xero / Export invoice button is missing / Export status column shows “NONE”
Cause
Company profile has not been configured correctly
Fix
Ensure the desired accounting integration is enabled under the Integrations tab (Xero/MYOB/Quickbooks)
Ensure the correct integration is selected under the “Export to” field under the Timesheet settings (Agency settings if exporting agency to host invoices and Admin settings if exporting admin to host invoices)
An existing Invoice with the specified Type and InvoiceID could not be found
Cause
The RCTI/Invoice has already been exported, but the client deleted it in Xero and tried to re-export it.
Related Ticket
Fix
Remove the value from ExternalID in the DB.
Unable to export an invoice to Xero due to ValidationErrors:
Cause
There is a negative value in the Unit or Quantity column on the affected invoice.
Fix
Update the Unit or Quantity to a positive value, then update the rate to reflect the negative amount.