How can we improve WHMCS?

Share, discuss and vote for what you would like to see added to WHMCS

Sort GetInvoices API to sort by invoice id



Call GetInvoices api is returning result is wrong order https://developers.whmcs.com/api-reference/getinvoices/

The data returned is ordered by the tblinvoices.duedate value and is sorted by descending order
However, if there are multiple invoices on the SAME date, the order seems to be RANDOM
As such, if I have a new order, it will be slotted into the middle of the list, (end of all the orders created today), instead of sorting by date time.
Or, is that possible if I can pass in the order parameter myself? Then at least I control it to return in a more meaningful listing. i.e. order by invoice id instead. So that I can show latest invoice created to be listed on top of the list.

Post the first comment

Login to post a comment.