gutterboy Posted September 3, 2014 Report Posted September 3, 2014 What is the easiest way to find out if a certain user (based on their client id) has overdue invoices via the API? Thanks!
Tyson Posted September 3, 2014 Report Posted September 3, 2014 Easiest way: $client_id = 1; $obj = new stdClass(); Loader::loadModels($obj, array("Invoices")); $has_overdue_invoices = (count($obj->Invoices->getStatusCount($client_id, "past_due")) > 0);
gutterboy Posted September 4, 2014 Author Report Posted September 4, 2014 On 9/3/2014 at 6:31 PM, Tyson said: Easiest way: $client_id = 1; $obj = new stdClass(); Loader::loadModels($obj, array("Invoices")); $has_overdue_invoices = (count($obj->Invoices->getStatusCount($client_id, "past_due")) > 0); Thanks. I might do it a bit different as I am using the SDK. But I'm good now as I know the correct method to use. Cheers!
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now