How to find invalid invoice distributions for a ‘DIST ACCT INVALID’ hold

A ‘DIST ACCT INVALID’ hold is being placed on an invoice because the invoice distribution is invalid. The Invoice on Hold Report shows the invoice has the hold ‘DIST ACCT INVALID’. If you run the following SQL, it will give the INVALID distributions on the invoice.

 SELECT invoice_distribution_id,distribution_line_number

FROM ap_invoice_distributions D

WHERE D.invoice_id = <invoice_id>for which the distribution is

INVALID

AND D.posted_flag||” in (‘N’, ‘P’)

AND ((EXISTS (select ‘x’

from gl_code_combinations C

where D.dist_code_combination_id = C.code_combination_id (+)

and (C.code_combination_id is null

or C.detail_posting_allowed_flag = ‘N’

or C.start_date_active > D.accounting_date

or C.end_date_active < D.accounting_date

or C.template_id is not null

or C.enabled_flag <> ‘Y’

or C.summary_flag <> ‘N’

)))

OR

(D.dist_code_combination_id = -1))

4 thoughts

Want to give some comment to author ( Shivmohan Purohit )

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s