Interop.PeachwServer.GetOverdueInvoices not exporting all unpaid invoices

SOLVED

I am not getting all unpaid invoices using Interop.PeachwServer.GetOverdueInvoices. 

 App.GetOverdueInvoices(1, duedate, invoicenum, custname, amount, custID, PostOrder, POA, transdate, begbal)

What can i do to verify what might be the cause?

  • 0
    verified answer
    Found the solution:
    The invoices had a negative value in the Age column. the way to fix it was do a datediff.

    Dim currdate As Date = Date.Now
    Dim begindate As Date = "1/1/1900"
    Dim numdays As Integer = -1 * DateDiff(DateInterval.Day, begindate, currdate)
    App.GetOverdueInvoices(numdays, duedate, invoicenum, custname, amount, custID, PostOrder, POA, transdate, begbal)