DBA Data[Home] [Help]

APPS.PO_INVOICES_SV1 SQL Statements

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

Line: 180

	SELECT	200 Application_ID, --this APs application ID
	        PO_MOAC_UTILS_PVT.Get_Current_Org_Id Payer_Org_Id,
	        pvds.party_id Payer_Party_Id,
	        pvss.party_site_id Payee_Party_Site_Id,
	        'PAYABLES_DOC' Pay_Proc_Trxn_Type_Code,
	        NVL(pvss.payment_currency_code, pvss.invoice_currency_code) Payment_Currency,
	        'PAYABLES_DISB' Payment_Function,
	        NVL(pvss.pay_group_lookup_code, pvds.pay_group_lookup_code),
		pvss.payment_priority,
		pvss.terms_date_basis,
		pvss.state vendor_income_tax_region,
		pvds.type_1099,
		pvss.allow_awt_flag,
		pvss.awt_group_id,
		pvss.exclude_freight_from_discount,
		NVL(pvss.payment_currency_code, pvss.invoice_currency_code)
	INTO	X_txn_attributes_rec.Application_Id,
	        X_txn_attributes_rec.Payer_Org_Id,
	        X_txn_attributes_rec.Payee_Party_Id,
	        X_txn_attributes_rec.Payee_Party_Site_Id,
	        x_txn_attributes_rec.Pay_Proc_Trxn_Type_Code,
	        x_txn_attributes_rec.Payment_Currency,
	        x_txn_attributes_rec.Payment_Function,
	        X_pay_group_lookup_code,
		X_payment_priority,
		X_terms_date_basis,
		X_vendor_income_tax_region,
		X_type_1099,
		X_awt_flag,
		X_awt_group_id,
		X_exclude_freight_from_disc,
		X_payment_currency_code
	FROM	po_vendors 	pvds,
		po_vendor_sites pvss
	WHERE	pvss.vendor_site_id = X_default_pay_site_id
	AND	pvss.vendor_id = pvds.vendor_id;
Line: 218

        SELECT  legal_entity_id
        INTO    x_txn_attributes_rec.Payer_Legal_Entity_Id
        FROM    hr_operating_units hou
        WHERE   hou.organization_id = X_txn_attributes_rec.Payer_Org_Id;
Line: 223

        SELECT to_number(org_information2)
        INTO   x_txn_attributes_rec.Payer_Legal_Entity_Id
        FROM   hr_organization_information hoi,
               hr_all_organization_units_tl otl
        WHERE  hoi.organization_id =  X_txn_attributes_rec.Payer_Org_Id
        AND    hoi.organization_id = otl.organization_id
        AND    hoi.org_information_context = 'Operating Unit Information'
        AND    otl.language = userenv('LANG');
Line: 283

	/* This select statement is used to obtain the AP_SYSTEM_PARAMETERS */

	SELECT		set_of_books_id,
			base_currency_code,
			NVL(batch_control_flag, 'N') batch_control_flag,
			default_exchange_rate_type,
			multi_currency_flag,
			gl_date_from_receipt_flag,
			disc_is_inv_less_tax_flag,							income_tax_region,
			income_tax_region_flag,
			transfer_desc_flex_flag,
			org_id,
                        awt_include_tax_amt
	INTO		X_def_sets_of_books_id,
			X_def_base_currency_code,
			X_def_batch_control_flag,
			X_def_exchange_rate_type,
			X_def_multi_currency_flag,
			X_def_gl_dat_fr_rec_flag,
			X_def_dis_inv_less_tax_flag,
			X_def_income_tax_region,
			X_def_income_tax_region_flag,
			X_def_transfer_desc_flex_flag,
			X_def_org_id,
                        X_def_awt_include_tax_amt
	FROM		ap_system_parameters;
Line: 312

	SELECT		vat_country_code
	INTO		X_def_vat_country_code
	FROM		financials_system_parameters;
Line: 368

	SELECT	ap_batches_s.nextval
	INTO	X_tmp_batch_id
	FROM    dual;
Line: 375

	INSERT INTO	ap_batches_all
		( 	batch_id,
			batch_name,
			batch_date,
			invoice_currency_code,
			payment_currency_code,
			last_update_date,
			last_updated_by,
			last_update_login,
			creation_date,
			created_by,
			org_id
		)
	VALUES
		(	X_tmp_batch_id,
			X_batch_name || '/' || TO_CHAR(sysdate)
				|| '/' || TO_CHAR(X_tmp_batch_id),
			sysdate,
			X_currency_code,
			X_currency_code,
			sysdate,
			FND_GLOBAL.user_id,
			FND_GLOBAL.login_id,
			sysdate,
			FND_GLOBAL.user_id,
			p_org_id
		);
Line: 417

  PROCEDURE NAME: 	update_ap_batches()

==================================================================*/
PROCEDURE update_ap_batches( X_batch_id	 IN	NUMBER,
			X_invoice_count	 IN	NUMBER,
			X_invoice_total  IN	NUMBER)

IS
	X_progress   		VARCHAR2(3) := null;
Line: 441

	UPDATE 	ap_batches_all
	SET	actual_invoice_count 	= X_invoice_count,
		actual_invoice_total 	= X_invoice_total,
		control_invoice_count   = X_invoice_count,
		control_invoice_total   = X_invoice_total,
		last_updated_by 	= FND_GLOBAL.user_id,
		last_update_date 	= sysdate,
		last_update_login 	= FND_GLOBAL.login_id
	WHERE	batch_id = X_batch_id;
Line: 456

       	po_message_s.sql_error('update_ap_batches', x_progress,sqlcode);
Line: 458

END update_ap_batches;
Line: 494

	SELECT		period_name
	FROM		gl_period_statuses gps
	WHERE		gps.application_id = 200   /*** Payables ***/
	AND		gps.set_of_books_id = X_def_sets_of_books_id
	AND		gps.adjustment_period_flag = 'N'
	AND		X_temp_accounting_date
	BETWEEN 	gps.start_date AND gps.end_date
	AND		gps.closing_status IN ('O', 'F');
Line: 614

   l_last_update_date 		AP_INVOICES.last_update_date%TYPE;
Line: 627

     SELECT  gl_date
     INTO    l_gl_date
     FROM    ap_invoices_all
     WHERE   invoice_id = p_invoice_id;
Line: 634

                            P_last_updated_by           =>  1,
                            P_last_update_login         =>  1,
                            P_accounting_date           =>  l_gl_date,
                            P_message_name              =>  l_message_name,
                            P_invoice_amount            =>  l_invoice_amount,
                            P_base_amount               =>  l_base_amount,
                            P_temp_cancelled_amount     =>  l_temp_cancelled_amount,
                            P_cancelled_by              =>  l_cancelled_by,
                            P_cancelled_amount          =>  l_cancelled_amount,
                            P_cancelled_date            =>  l_cancelled_date,
                            P_last_update_date          =>  l_last_update_date,
                            P_original_prepayment_amount=>  l_original_prepayment_amount,
                            P_pay_curr_invoice_amount   =>  l_pay_curr_invoice_amount,
                            P_Token                     =>  l_token,
                            P_calling_sequence          =>  'rvtth.lpc'
                  )
        ) THEN
        IF (g_asn_debug = 'Y') THEN
          asn_debug.put_line('AP_CANCEL_PKG.Ap_Cancel_Single_Invoice returned FALSE');
Line: 708

	select 	invoice_id
	from 	AP_INVOICES_ALL
	where 	invoice_num = p_invoice_num
	and	vendor_id = p_vendor_id
	and     org_id = p_org_id;  -- Bug 9008159;
Line: 821

PROCEDURE delete_interface_records(
    x_return_status     OUT NOCOPY VARCHAR2,
    p_group_id          IN VARCHAR2)
IS
    l_api_name VARCHAR2(50) := 'delete_interface_records';
Line: 829

    DELETE FROM ap_invoice_lines_interface aili
    WHERE EXISTS (SELECT 1
                  FROM   ap_invoices_interface aii
                  WHERE  aii.invoice_id = aili.invoice_id
                  AND    aii.group_id = p_group_id);
Line: 835

    DELETE FROM ap_invoices_interface aii
    WHERE       aii.group_id = p_group_id;
Line: 841

END delete_interface_records;