[Home] [Help]
4849: SELECT count(*)
4850: INTO l_count_inv
4851: FROM iby_hook_docs_in_pmt_t docs,
4852: -- RG ap_selected_invoices apsi,
4853: ap_awt_temp_distributions awtd
4854: WHERE docs.payment_id = P_Selected_Check_Id
4855: AND nvl(docs.dont_pay_flag,'N') ='N'
4856: AND docs.calling_app_doc_unique_ref2 = awtd.invoice_id
4857: AND docs.calling_app_id=200 ;
4943: -----------------------------------------------------
4944:
4945: SELECT nvl(sum(withholding_amount), 0)
4946: INTO l_withholding_amount
4947: FROM ap_awt_temp_distributions
4948: WHERE checkrun_name = P_Checkrun_Name
4949: AND checkrun_id= p_checkrun_id
4950: AND invoice_id = rec_sel_inv.invoice_id
4951: AND payment_num = rec_sel_inv.payment_num;
5125: -- Checks for temporary distribution lines
5126: -------------------------------------------
5127: SELECT count('Withholding Already Calculated')
5128: INTO l_count
5129: FROM ap_awt_temp_distributions apatd
5130: WHERE apatd.invoice_id = P_Invoice_Id
5131: AND apatd.tax_name = P_Tax_Name;
5132:
5133: IF (nvl(l_count, 0) > 0) THEN