phpactivecollab

ActiveCollab API results of estimates lacking data?


I am using the Active Collab API (activecollab-feather-sdk php) to retrieve estimates.

$response = $client->get("/estimates/archive?page=$page")->getJson();

I am wondering why the values for paid_amount and balance_due are always the same,

[paid_amount] => 0
[balance_due] => n # equals to total

even if there are invoices generated based on this estimate. In my example, I´ve generated two invoices out of this estimate and paid_amount should hold both invoice total values in sum but always is 0. And balance_due should show "estimate total - paid amount" but always stays at the total of the estimate.

In that way, these both values make no sense and I am wondering if the API delivers wrong values, or if we´re handling AC wrong in any way?

Thank you for any ideas on that. Hope to reach a ActiveCollab dev here, support send me here.


Solution

  • Money from invoices does not flow back to estimates, because system keeps a lose connection between invoices and estimates (invoices can have different items, amounts etc). That is why amounts that are invoiced and/or paid are not reflected in estimates.

    You can implement your own checks where you get invoices created from estimates, and compare amounts.