262: and section_type = p_section_type; */
263:
264:
265:
266: cursor c_ap_holds_all(p_invoice_id number) is
267: select count(invoice_id)
268: from ap_holds_all
269: where invoice_id = p_invoice_id
270: and release_reason is null;
264:
265:
266: cursor c_ap_holds_all(p_invoice_id number) is
267: select count(invoice_id)
268: from ap_holds_all
269: where invoice_id = p_invoice_id
270: and release_reason is null;
271:
272:
310: end if;
311:
312: if p_match_status_flag is not null then
313: /* Scenarios other than holds release */
314: open c_ap_holds_all(p_invoice_id);
315: fetch c_ap_holds_all into ln_no_of_holds;
316: close c_ap_holds_all;
317:
318: if nvl(ln_no_of_holds, 0) > 0 then
311:
312: if p_match_status_flag is not null then
313: /* Scenarios other than holds release */
314: open c_ap_holds_all(p_invoice_id);
315: fetch c_ap_holds_all into ln_no_of_holds;
316: close c_ap_holds_all;
317:
318: if nvl(ln_no_of_holds, 0) > 0 then
319: p_is_invoice_validated := 'N';
312: if p_match_status_flag is not null then
313: /* Scenarios other than holds release */
314: open c_ap_holds_all(p_invoice_id);
315: fetch c_ap_holds_all into ln_no_of_holds;
316: close c_ap_holds_all;
317:
318: if nvl(ln_no_of_holds, 0) > 0 then
319: p_is_invoice_validated := 'N';
320: p_codepath := jai_general_pkg.plot_codepath(5, p_codepath); /* 5 */