2281: from jai_rgm_taxes
2282: where tax_type = cp_tax_type
2283: and trx_ref_id in
2284: ( select trx_ref_id
2285: from jai_rgm_refs_all jra
2286: where
2287: source_ref_document_id = cp_source_doc_id and
2288: jra.source_document_date between p_from_date and p_to_date
2289: and settlement_id
2318: from jai_ar_etcs_t for update ;
2319:
2320: cursor c_line_amt(cp_source_document_ref_id number, cp_check_id in number) is
2321: select nvl(sum(line_amt),0)
2322: from jai_rgm_refs_all jra
2323: where
2324: source_ref_document_id = cp_source_document_ref_id and
2325: jra.source_document_date between p_from_date and p_to_date
2326: and settlement_id
2352:
2353: Cursor c_source_ref_type(cp_source_ref_id in number)
2354: is
2355: select source_document_type
2356: from jai_rgm_refs_all
2357: where source_document_id = cp_source_ref_id
2358: and source_document_type IN (jai_constants.ar_cash_tax_confirmed , jai_constants.trx_type_inv_comp)
2359: and rownum = 1 ;
2360:
2383:
2384: v_bank_account_id NUMBER(15);
2385: v_bank_branch_code ce_bank_branches_v.BRANCH_NUMBER%TYPE;
2386:
2387: lv_source_ref_type jai_rgm_refs_all.source_document_type%TYPE ;
2388: lv_doc_date date ;
2389:
2390: BEGIN
2391:
2432: sysdate ,
2433: fnd_global.login_id
2434: from
2435: jai_ap_rgm_payments jrp,
2436: jai_rgm_refs_all jra,
2437: jai_rgm_taxes jrt,
2438: jai_rgm_certificates jrc
2439: where
2440: jrp.settlement_id = jra.settlement_id and