When creating a repeating invoice via the Xero API the LineAmountTypes
field is being correctly set to "Tax Exclusive" but this setting is not being honoured.
POST .xro/2.0/RepeatingInvoices
Data sent to API:
const invoiceData = {
Type: 'ACCREC',
Contact: {
ContactID: contactId
},
Schedule: {
Period: 12,
Unit: 'MONTHLY',
StartDate: startDate,
DueDate: 20,
DueDateType: 'OFFOLLOWINGMONTH',
},
LineAmountTypes: 'Exclusive',
LineItems: lineItems,
Status: 'DRAFT'
};
When the invoice is first created "Tax Exclusive" appears to be selected, however the Total GST is $0.00 and the Tax Adjustment is $-204.
Initial Result Showing Incorrect Tax Values
When I manually re-select "Tax Exclusive" from the dropdown in the UI it suddenly corrects itself.
Correct Result After Re-Selecting Tax Exclusive
Is this a bug in the API or am I doing something wrong with my request payload?