There is no need to code to separate invoices. The GL distribution of an AP transaction is saved in Payables.
The attached workspace shows how to calculate this. You can run it against the Adagio Sample Data. If you want to use it against your own data, you will have to edit the GL Account numbers and Filters (perhaps).
Attachments
BreakoutTax.zip (47 downloads)
_________________________
Andrew Bates