DBA Data[Home] [Help]

APPS.FV_AR_PKG SQL Statements

The following lines contain the word 'select', 'insert', 'update' or 'delete':

Line: 5

PROCEDURE delete_offsetting_unapp(p_posting_control_id IN NUMBER,
	                          p_sob_id IN NUMBER,
				  p_status OUT NOCOPY NUMBER) IS
  l_module_name VARCHAR2(200) := g_module_name || 'delete_offsetting_unapp';
Line: 15

	SELECT SUBSTR(reference22,1,INSTR(reference22,'C')-1) cash_receipt_id,
	       accounting_date,
	       SUM(entered_dr) entered_dr,
	       SUM(entered_cr) entered_cr,
	       SUM(accounted_dr) accounted_dr,
	       SUM(accounted_cr) accounted_cr
	FROM   gl_interface gi,
	       ar_cash_receipts cr
	WHERE gi.reference30 = 'AR_RECEIVABLE_APPLICATIONS'
	AND   gi.group_id = pcid
	AND   gi.user_je_source_name = 'Receivables'
	AND   gi.set_of_books_id = sob_id
	AND   substr(gi.reference29,7) = 'UNAPP'
	AND   cr.cash_receipt_id = substr(gi.reference22,1,instr(gi.reference22,'C')-1)
	GROUP BY SUBSTR(gi.reference22,1,INSTR(gi.reference22,'C')-1),
	          cr.amount, cr.status, gi.accounting_date
	HAVING SUM(entered_dr) =  SUM(entered_cr)
	   AND SUM(accounted_dr) =  SUM(accounted_cr)
	   AND cr.amount <> 0 ;
Line: 72

	          DELETE FROM gl_interface
	          WHERE reference30 = 'AR_RECEIVABLE_APPLICATIONS'
	            AND group_id = p_posting_control_id
	            AND substr(reference29,7) = 'UNAPP'
	            AND substr(reference22,1,instr(reference22,'C')-1) =
						    cash_receipt_id_t(j)
	            AND accounting_date = accounting_date_t(j);
Line: 95

	END delete_offsetting_unapp;