Which GL account(s) did my sales invoice post to?

A sales invoice is not assigned to a specific GL account until after Batch Posting and reflects your account assignments at the time of batch posting (GL Posting Specifications).  So, the first step in finding out which GL account a sales invoice has posted to is to be sure and (GL > Batch Post) all transactions.  Then, you can use the following SQL query to get a listing of invoices with the GL accounts they were posted to.

To do this, go to (Utilities > Database Queries) and copy/paste the following statement into the SQL box:


After pasting it, click the OK button and the spreadsheet should populate with data (it may take a moment).  You can save this spreadsheet, open it in the spreadsheet editor of your choice and filter/sort as needed.