API: Access 'Account' for a TransactionLine of type ControlAccount

Well I have managed to generate my cross cast (mentioned in in another thread).

The source code is, as you might expect, a mess, as I was learning as I was coding. But it’s on GitHub; the project is here and the source file is here.

What is nice is that my cross cost total matches (exactly) with the cash flow summary, each of the bank accounts increase/decrease over the year match (there are 7 accounts in our case), and each of the category totals match the P&L account (except for journal entries, which I am about to speak to my accountant about to see how he wants this processed, as I suspect he’ll want this as a separate sheet).

Ultimately I hope that something like this could be integrated (in a much tidier way I’m sure) directly into Manager, the script currently has some limitations which are fine for my use case (like when a payment from a bank goes on an invoice, it only allows one transaction line on that invoice). This stuff could obviously be resolved if it was going to go into ‘production’ (i.e. included into Manager itself).