415: ln_flag number;
416: cursor chk_exist(cn_invoice_id number)
417: is
418: select 1
419: from dual
420: where exists
421: (
422: SELECT INVOICE_ID
423: FROM AP_INVOICE_DISTRIBUTIONS_ALL
453: ln_flag number;
454: cursor chk_exist(cn_invoice_id number)
455: is
456: select 1
457: from dual
458: where not exists
459: (
460: SELECT PREPAY_DISTRIBUTION_ID
461: FROM AP_INVOICE_DISTRIBUTIONS_ALL
5911: where set_of_books_id = cp_set_of_books_id;
5912:
5913: cursor c_get_ja_in_ap_inv_id is
5914: select to_char(JAI_AP_TDS_THHOLD_TRXS_S1.nextval)--to_char(JAI_AP_TDS_INVOICE_NUM_S.nextval)commented by rchandan for bug#4487676
5915: from dual;
5916:
5917: cursor c_ap_payment_schedules_all(p_invoice_id number) is
5918: select payment_priority
5919: from ap_payment_schedules_all
6830: where set_of_books_id = cp_set_of_books_id;
6831:
6832: cursor c_get_ja_in_ap_inv_id is
6833: select to_char(JAI_AP_TDS_THHOLD_TRXS_S1.nextval)--to_char(JAI_AP_TDS_INVOICE_NUM_S.nextval)commented by rchandan for bug#4487676
6834: from dual;
6835:
6836: cursor c_ap_payment_schedules_all(p_invoice_id number) is
6837: select payment_priority
6838: from ap_payment_schedules_all
10359: where set_of_books_id = cp_set_of_books_id;
10360:
10361: cursor c_get_ja_in_ap_inv_id is
10362: select to_char(JAI_AP_TDS_THHOLD_TRXS_S1.nextval)--to_char(JAI_AP_TDS_INVOICE_NUM_S.nextval)commented by rchandan for bug#4487676
10363: from dual;
10364:
10365: cursor c_ap_payment_schedules_all(p_invoice_id number) is
10366: select payment_priority
10367: from ap_payment_schedules_all