最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Xero Repeating Invoice API not honouring LineAmountTypes field - Stack Overflow

programmeradmin8浏览0评论

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?

发布评论

评论列表(0)

  1. 暂无评论