533: v_start_date DATE,
534: v_end_date DATE,
535: v_name OKL_INDICES.NAME%TYPE) IS
536: SELECT ac.check_date change_date
537: FROM OKL_TRX_AP_INVOICES_B oklinv,
538: okl_txl_ap_inv_lns_all_b tpl,
539: okl_cnsld_ap_invs_all okl_cnsld,
540: AP_INVOICES inv,
541: AP_INVOICE_PAYMENTS pay,
536: SELECT ac.check_date change_date
537: FROM OKL_TRX_AP_INVOICES_B oklinv,
538: okl_txl_ap_inv_lns_all_b tpl,
539: okl_cnsld_ap_invs_all okl_cnsld,
540: AP_INVOICES inv,
541: AP_INVOICE_PAYMENTS pay,
542: AP_CHECKS AC,
543: fnd_application fnd_app
544: WHERE oklinv.id = tpl.tap_id
571: -- okl consolidation table okl_cnsld_ap_invs_all to join the consolidated invoices
572: -- from the transaction lines table.
573: CURSOR princ_csr(v_date IN DATE, v_khr_id IN NUMBER) IS
574: SELECT SUM(pay.amount)
575: FROM OKL_TRX_AP_INVOICES_B oklinv,
576: okl_txl_ap_inv_lns_all_b okl_inv_ln,
577: okl_cnsld_ap_invs_all okl_cnsld,
578: AP_INVOICES inv,
579: AP_INVOICE_PAYMENTS pay,
574: SELECT SUM(pay.amount)
575: FROM OKL_TRX_AP_INVOICES_B oklinv,
576: okl_txl_ap_inv_lns_all_b okl_inv_ln,
577: okl_cnsld_ap_invs_all okl_cnsld,
578: AP_INVOICES inv,
579: AP_INVOICE_PAYMENTS pay,
580: AP_CHECKS AC,
581: fnd_application fnd_app
582: WHERE oklinv.id = okl_inv_ln.tap_id
894: -- okl consolidation table okl_cnsld_ap_invs_all to join the consolidated invoices
895: -- from the transaction lines table.
896: CURSOR fund_csr(v_khr_id NUMBER) IS
897: SELECT MIN(ac.check_date)
898: FROM OKL_TRX_AP_INVOICES_B oklinv,
899: okl_txl_ap_inv_lns_all_b okl_inv_ln,
900: okl_cnsld_ap_invs_all okl_cnsld,
901: AP_INVOICES inv,
902: AP_INVOICE_PAYMENTS pay,
897: SELECT MIN(ac.check_date)
898: FROM OKL_TRX_AP_INVOICES_B oklinv,
899: okl_txl_ap_inv_lns_all_b okl_inv_ln,
900: okl_cnsld_ap_invs_all okl_cnsld,
901: AP_INVOICES inv,
902: AP_INVOICE_PAYMENTS pay,
903: AP_CHECKS AC,
904: fnd_application fnd_app
905: WHERE oklinv.id = okl_inv_ln.tap_id
1155: -- Changed the select statement by Santonyr on 04-Aug-2004 to improve the performance
1156:
1157: CURSOR fund_csr(v_khr_id NUMBER) IS
1158: SELECT MIN(ac.check_date)
1159: FROM OKL_TRX_AP_INVOICES_B oklinv,
1160: okl_txl_ap_inv_lns_all_b okl_inv_ln,
1161: okl_cnsld_ap_invs_all okl_cnsld,
1162: AP_INVOICES inv,
1163: AP_INVOICE_PAYMENTS pay,
1158: SELECT MIN(ac.check_date)
1159: FROM OKL_TRX_AP_INVOICES_B oklinv,
1160: okl_txl_ap_inv_lns_all_b okl_inv_ln,
1161: okl_cnsld_ap_invs_all okl_cnsld,
1162: AP_INVOICES inv,
1163: AP_INVOICE_PAYMENTS pay,
1164: AP_CHECKS AC,
1165: fnd_application fnd_app
1166: WHERE oklinv.id = okl_inv_ln.tap_id