Missing or incorrect ledger account when posting batch/multiple free text invoices

Hello - Hoping someone can help me out...I've been stumped after scouring the internet.

Basically, when the user generates recurring invoices, they generate fine. (he does this as a multi-group) and not selecting a specific customer/template. (below)

But when he goes to post them, they not all of them actually post and I'm thinking that its because they generate the error below.

"One or more accounting distribution is missing a ledger account or contains a ledger account that is not valid.
Use the Accounting distribution form or the Posting profile to update the ledger account."

I searched for this error and all I see are answers as they relate to Purchase Orders, not free text invoices...and since this is done in "batch", I don't see a way to place breakpoints and interactively step through the code.

But he is able to post each individual Invoice, one-at-a-time at the end of each month, but this causes much frustration. This just started happening recently.

I did a search for this particular error within the code and found that its thrown when there is a "0" in the ledger dimension field of the AccountingDistributinon table and ran the same sql query that I found in that method in the AOT, but I found no records with a zero.

There is another condition where it will throw the error but I'm unable to decipher what its checking for without being able to step-thru/runtime and debug...

Can anyone provide insight? thanks.