0

When I have an Invoice which is fully paid with a Credit Note allocation, the FullyPaidOnDate is different when retrieving a single invoice to what it is when retrieving a collection of Invoices.

The credit note is allocated as soon as the Invoice is created.

  1. When retrieving a single Invoice, the FullyPaidOnDate is the same date as the Invoice.

  2. When retrieving a collection of invoices, the FullyPaidOnDate is the same date as the Credit Note date.

Is there any reason for the difference?

// THE FOLLOWING JSON FROM QUERYING A SINGLE INVOICE- Note that some fields are removed for brevity.
// The fully paid date is the same as the Invoice date. The Credit Note was applied immediately after creating the invoice.
//1. The Credit Note was created on the 15th July.
//2. The Invoice was created on the 27th July.
//3. The Credit Note was immediately allocated to the Invoice on the 27th July resulting in the Invoice being fully paid.
{
  "Invoices": [
    {
      "Type": "ACCREC",
      "InvoiceID": "nnnnnnnn-nnnn-nnnn-nnnn-nnnnnnnnnnnn",
      "InvoiceNumber": "INV-1234",
      "Reference": "Corroborating the Forensic Interview",
      "CreditNotes": [
        {
          "CreditNoteID": "nnnnnnnn-nnnn-nnnn-nnnn-nnnnnnnnnnnn",
          "CreditNoteNumber": "CN-xxxx",
          "ID": "nnnnnnnn-nnnn-nnnn-nnnn-nnnnnnnnnnnn",
          "AppliedAmount": 114.55,
          "DateString": "2020-07-27T00:00:00",
          "Date": "/Date(1595808000000+0000)/",
          "LineItems": [],
          "Total": 995.00
        }
      ],
      "AmountDue": 0.00,
      "AmountPaid": 0.00,
      "AmountCredited": 114.55,
      "DateString": "2020-07-27T00:00:00",
      "Date": "/Date(1595808000000+0000)/",
      "DueDateString": "2020-08-11T00:00:00",
      "DueDate": "/Date(1597104000000+0000)/",
      "Status": "PAID",
      "FullyPaidOnDate": "/Date(1595808000000+0000)/" << Monday, 27 July 2020 00:00:00 [Converted from epoch date]
    }
  ]
}

## THE FOLLOWING COMES FROM QUERYING ALL INVOICES THAT ARE PAID OR VOID ##
//the FullyPaidDate is the same as the Credit Note date
{
  "Type": "ACCREC",
  "InvoiceID": "nnnnnnnn-nnnn-nnnn-nnnn-nnnnnnnnnnnn",
  "InvoiceNumber": "INV-1234",
  "Reference": "The Reference",
  "Payments": [],
  "CreditNotes": [
    {
      "CreditNoteID": "nnnnnnnn-nnnn-nnnn-nnnn-nnnnnnnnnnnn",
      "CreditNoteNumber": "CN-xxxx",
      "ID": "nnnnnnnn-nnnn-nnnn-nnnn-nnnnnnnnnnnn",
      "HasErrors": false,
      "AppliedAmount": 114.55,
      "DateString": "2020-07-15T00:00:00",
      "Date": "/Date(1594771200000+0000)/",
      "LineItems": [],
      "Total": 995.00
    }
  ],
  "AmountDue": 0.00,
  "AmountPaid": 0.00,
  "AmountCredited": 114.55,
  "CurrencyRate": 1.000000,
  "DateString": "2020-07-27T00:00:00",
  "Date": "/Date(1595808000000+0000)/",
  "DueDateString": "2020-08-11T00:00:00",
  "DueDate": "/Date(1597104000000+0000)/",
  "Status": "PAID",
  "LineAmountTypes": "Exclusive",
  "LineItems": [],
  "SubTotal": 114.55,
  "TotalTax": 0.00,
  "Total": 114.55,
  "UpdatedDateUTC": "/Date(1595882469570+0000)/",
  "CurrencyCode": "USD",
  "FullyPaidOnDate": "/Date(1594771200000+0000)/" << Wednesday, 15 July 2020 00:00:00 [Converted from epoch date]
},
DominicF
  • 51
  • 5
  • In your first example, though, the credit note date is the same as the invoice date and the fully-paid-on date, where in the second the credit note has a different date. – droopsnoot Aug 04 '20 at 08:40
  • Yes I know. I suspect this is also possibly a bug. The Credit Note would have been allocated on the 2020-07-27, but created on the 2020-07-15. I have added some extra comments to the example responses. – DominicF Aug 04 '20 at 20:31
  • It doesn't seem unreasonable that the date on the credit note when it's returned as part of the invoice detail would be the date it was applied to the invoice rather than the date it was raised - just like the amount is - but it would be nice if the documentation mentioned it. Apart from anything, if the doc covered it, it would be less likely to change. – droopsnoot Aug 05 '20 at 08:44
  • Ah, sorry, because you changed the reference and blanked the invoice number in the second example I'd presumed it was actually a different invoice. That _does_ seem weird, and perhaps one for Xero API support. – droopsnoot Aug 05 '20 at 08:47

0 Answers0