I've been looking through the Java API for a good way of fetching the total cost for a closed project, I half expected/hoped ProjectData to have something like that, but alas it seems to not.
My current solution is to fetch all EntryData for a project and sum up the CREDITOR_INVOICE and JOURNAL_ENTRY type entries, which seems less than optimal.
For one, I'm not really sure which, if any, other entry types count towards the total cost. The data, I've tested and compared with against the GUI's closed project list (production data for about 8 months worth of projects), suggests the above mentioned types are "good enough" for this case. I'd just hate to get a sudden surprise when some large amount in an "unknown" entry type suddenly skews the numbers.
Secondly, performance and amount of API calls. I might be required to fetch up to 50 projects' worth of entries in some cases, which can amount to a sizable chunk of data.
Is there a better way of doing this?
Also, I can't seem to find the date the project was closed (booked?) anywhere, any pointers there?
Pardon the Java references here, I've since realised that what my project (that I've inherited) is using probably isn't any official Java API, but just generated code from your wsdl.
However, the questions still stand.