Yes, with "six" or "twenty-one" theme all existing records are passed to $invoices and DataTables has all of them.
But with custom theme it is like default &itemlimit=10 is set and so only 10 records is passed to $invoices. So there is only 10 records in page source. And DataTable can display only 10 invoices (like there is ONLY 10 invoices exists) regardless of settings, changing Limit in datatble, or setting "pageLength": -1. "Showing 1 to 10 of 10 entries" until I add &itemlimit=10 and then get "Showing 1 to 10 of 54 entries" like in "six" or "twenty-one" theme.
1) Is it possible to change some internal WMCS setting, that is managed by adding URL parameter &itemlimit from 10 to "all" by default?
2) Why can WHCMS return different number of items with different theme?
3) Could you please try add any custom theme to WHMCS, place just {$invoices|count} into clientareainvoices.tpl, clear cookie and check how many records will WHMCS return by default? If it is only 10 - could this be changed to "-1" or "all" in some way?