3596: checks.cleared_date,
3597: pv.small_business_flag
3598: FROM ap_invoices_all inv
3599: ,ap_checks_all checks
3600: ,ap_invoice_payments_all pay
3601: ,po_vendors pv
3602: ,zx_lines_det_factors zdf
3603: WHERE inv.set_of_books_id = DECODE(p_legal_entity_id, NULL, p_ledger_id,
3604: inv.set_of_books_id)