My Products
Help
danielboylan
CONTRIBUTOR ***

Invoice changedDateTime not showing seconds

by danielboylan

Hi,

I need to get invoices for customers that are sent since my last run. But since changedDateTime doesnt use seconds, i will have some issues with either duplicates(using _gte comparison)  or not finding files(using _gt comparison) that are sent the same minute.

Since changedDateTime is using ISO-8601 standard, are you able to add the use of seconds?

Or is it a better way to do this?

Now i first get the associates with the EDI flag enabled for invoices, i then get a list of the invoices created after(_gt) changedDateTime and has the DoneInvoicesAndCreditNotes flag.


Invoice list query: 

query GetInvoiceList($cId: Int, $date: DateTime, $customerId: Int) {
  useCompany(no : $cId)
  {    
     orderDocument(filter: { _and: [
{changedDateTime: {_gt: $date}},
      {orderStatus1Flags: {_is_on: DoneInvoicesAndCreditNotes}},
    {customerNo: {_eq: $customerId}}
    ]})
    {
      totalCount
      items
      {
        invoiceNo
      }
    }
  }
}

 

 

5 REPLIES 5
Accepted solution
Marius Bancila
VISMA

by Marius Bancila

This has been released today. See https://docs.business.visma.net/docs/schema/datetime.

 

danielboylan
CONTRIBUTOR ***

by danielboylan

That's great, thanks!

omelhus
PARTNER

by omelhus

Awesome!

by Marius Bancila

Thanks for reporting this. I have added it to our backlog.

omelhus
PARTNER

by omelhus

I second this. All tables where Chtmms (ChangeTimeInMs) is present should use that for millisecond precision on time, whilst the others can fall back to chtm (ChangedTime).