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))
+91 7028476376