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! Quote
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); Quote
gutterboy Posted September 4, 2014 Author Report Posted September 4, 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); 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! Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.