DBA Data[Home] [Help]

APPS.ARP_PROCESS_BOE SQL Statements

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

Line: 48

 |     arp_cr_history_pkg.update_p - Updates CRH table bank charges info     |
 |     arp_cash_receipts_pkg.update_p- Updates CR table with remittance bank |
 |                    account, customer bank account and                     |
 |                    override_remit_account_flag			     |
 |     arp_ps_pkg.update_p - Updates maturity date in PS table.              |
 |     arp_util.debug              					     |
 |                                                                           |
 | ARGUMENTS  : IN:                                                          |
 |                p_cr_id - Cash receipt ID                                  |
 |                p_ps_id - Payment Schedule ID                              |
 |                p_crh_id - Cash receipt History ID                         |
 |                p_selected_remittance_batch_id - This field indicates if a |
 |                    receipt has been selected to belong to a remittance    |
 |                    batch. If the field is not NULL, then the field points |
 |                    to the remittance batch, the receipt belongs to, else  |
 |                    the field is NULL.                                     |
 |                p_remittance_bank_account_id - Remittance bank account id  |
 |                    of the receipt.                                        |
 |                p_override_remit_account_flag - override_remit_account_flag|
 |                    of the receipt.                                        |
 |                p_customer_bank_account_id - Custome bank account ID of the|
 |                    receipt.                                        	     |
 |                p_bank_charges- Bank charges, to update CRH row            |
 |                p_maturity_date - Maturity date to update DUE_DATE in PS   |
 |                p_module_name - Name of module that called this proc.      |
 |                p_module_version - Version of the module that called       |
 |                                       this procedure                      |
 |              OUT:                                                         |
 |                p_batch_applied_status - currenct batch aplied status if   |
 |                   conc. req was started.                                  |
 |                p_request_id  - Request id of conc. request.               |
 |                                                                           |
 | RETURNS    : NONE                                                         |
 |                                                                           |
 | NOTES                                                                     |
 |                                                                           |
 | MODIFICATION HISTORY - Created by Ganesh Vaidee - 10/05/95                |
 |      11/20/1995 -      The procedure now calls the conc. request to start |
 |                        approval or formatting of a batch if need be       |
 |                        depending on the p_call_conc_req flag              |
 |      07/11/1996 OSTEINME	Changed code to store bank charges in        |
 |				factor_discount_amount of ar_cash_receipts   |
 |				table instead of cash_receipt_history table. |
 |				(bug 376326)			             |
 |                                                                           |
 +===========================================================================*/
PROCEDURE add_or_rm_remit_rec_to_batch (
        p_cr_id       IN ar_cash_receipts.cash_receipt_id%TYPE,
        p_ps_id       IN ar_payment_schedules.payment_schedule_id%TYPE,
        p_crh_id      IN ar_cash_receipt_history.cash_receipt_history_id%TYPE,
        p_selected_remittance_batch_id   IN
                   ar_cash_receipts.selected_remittance_batch_id%TYPE,
        p_remittance_bank_account_id IN
                   ar_cash_receipts.remit_bank_acct_use_id%type,
        p_override_remit_account_flag IN
                   ar_cash_receipts.override_remit_account_flag%TYPE,
        p_customer_bank_account_id IN
                   ar_cash_receipts.customer_bank_account_id%TYPE,
        p_bank_charges IN
                   ar_cash_receipt_history.factor_discount_amount%TYPE,
        p_maturity_date IN
                   ar_payment_schedules.due_date%TYPE,
	p_batch_id		IN NUMBER,
        p_control_count		IN NUMBER,
        p_control_amount	IN NUMBER,
        p_module_name           IN VARCHAR2,
        p_module_version        IN VARCHAR2 ) IS
--
l_cr_rec   ar_cash_receipts%ROWTYPE;
Line: 134

       arp_standard.debug('val_args_add_or_rm_remit_rec: ' ||  'selected_remittance_batch_id = '||
				to_char( p_selected_remittance_batch_id ) );
Line: 166

    l_cr_rec.selected_remittance_batch_id := p_selected_remittance_batch_id;
Line: 175

    arp_cash_receipts_pkg.update_p( l_cr_rec );
Line: 182

   updates the crh record of a confirmed receipt, instead of
   updating the actual cr record.  Instead, I've added the update
   of the cr.factor_discount_amount column above.  OSTEINME, 7/11/96

    --
    -- Update CRH table with bank charges
    --
    arp_cr_history_pkg.set_to_dummy( l_crh_rec );
Line: 193

    arp_cr_history_pkg.update_p( l_crh_rec, l_crh_rec.cash_receipt_history_id );
Line: 201

      Payment Schedule should be updated only for CASH receipts
     --------------------------------------------------------------------*/

    IF (p_ps_id IS NOT NULL)
    THEN
       arp_ps_pkg.set_to_dummy( l_ps_rec );
Line: 209

       arp_ps_pkg.update_p( l_ps_rec, l_ps_rec.payment_schedule_id );
Line: 218

       select nvl(control_amount,0), nvl(control_count,0)
       into l_actual_amount_total,l_actual_count_total
       from  ar_batches
       where batch_id  = p_batch_id;
Line: 240

    arp_cr_batches_pkg.update_p( l_batch_rec, l_batch_rec.batch_id );
Line: 308

    SELECT type INTO cr_type FROM ar_cash_receipts WHERE cash_receipt_id = p_cr_id;
Line: 406

          arp_standard.debug('Selecting org_id from ar_system_parameters and p_batch_id : '||p_batch_id);
Line: 409

    SELECT org_id
      INTO l_org_id
      FROM ar_system_parameters;
Line: 479

    arp_cr_batches_pkg.update_p( l_bat_rec, l_bat_rec.batch_id );
Line: 533

       arp_standard.debug('Selecting org_id from ar_system_parameters and p_batch_id : '||p_batch_id);
Line: 535

   SELECT org_id
     INTO l_org_id
     FROM ar_system_parameters;
Line: 599

    arp_cr_batches_pkg.update_p( l_bat_rec, l_bat_rec.batch_id );
Line: 651

      arp_standard.debug('Selecting org_id from ar_system_parameters and p_batch_id : '||p_batch_id);
Line: 653

 SELECT org_id
   INTO l_org_id
   FROM ar_system_parameters;
Line: 719

    arp_cr_batches_pkg.update_p( l_bat_rec, l_bat_rec.batch_id );
Line: 825

      arp_standard.debug('Selecting org_id from ar_system_parameters and p_batch_id : '||p_batch_id);
Line: 827

   SELECT org_id
     INTO l_org_id
     FROM ar_system_parameters;
Line: 896

    	SELECT 	bat.batch_applied_status,
               	app.program_name
  	INTO   	l_batch_app_status,
	        l_program_name
  	FROM   	ar_batches bat,
	        ar_receipt_methods rm,
		ap_payment_programs app
  	WHERE  	bat.batch_id = p_batch_id
  	AND	bat.receipt_method_id = rm.receipt_method_id
  	AND	rm.auto_print_program_id = app.program_id;
Line: 909

            UPDATE  ar_cash_receipts
            SET     seq_type_last = 'Y'
            WHERE   cash_receipt_id IN (
		SELECT crh.cash_receipt_id
		FROM   ar_cash_receipt_history crh,
		       ar_receivable_applications ra,
                       ra_customer_trx ct,
                       iby_fndcpt_tx_extensions ext
               	WHERE crh.batch_id = p_batch_id
		AND   crh.current_record_flag = 'Y'
		AND   crh.status = 'CONFIRMED'
		AND   ra.cash_receipt_id = crh.cash_receipt_id
                AND   ra.application_type = 'CASH'
                AND   ra.status = 'APP'
                AND   ct.customer_trx_id = ra.applied_customer_trx_id
                AND   ext.trxn_extension_id = ct.payment_trxn_extension_id
                AND   NVL(ext.seq_type_last, 'N') = 'Y');
Line: 931

    arp_cr_batches_pkg.update_p( l_bat_rec, l_bat_rec.batch_id );
Line: 961

 |     arp_ct_pkg.update_p - Updates paying_customer_id and                  |
 |                           p_customer_bank_account_id in RA_CUSTOMER_TRX   |
 |     arp_ps_pkg.update_p - Updates selected_for_receipt_batch_id in PS tab.|
 |     arp_util.debug                                                        |
 |                                                                           |
 | ARGUMENTS  : IN:                                                          |
 |                p_ct_id - Customer Trx ID                                  |
 |                p_ps_id - Payment Schedule ID                              |
 |                p_selected_for_rec_batch_id - This field indicates if an   |
 |                    invoice has been selected to be paid by a receipt e    |
 |                    belonging to an automatic batch. Note: This field is   |
 |		      used to update the PS table and the RA_CUSTOMER_TRX    |
 |		      table.                                                 |
 |                p_paying_customer_id - Paying customer of the invoice.     |
 |                p_customer_bank_account_id - Custome bank account ID of the|
 |                    invoice.                                               |
 |                p_module_version - Version of the module that called       |
 |                                       this procedure                      |
 |              OUT:                                                         |
 |                p_batch_applied_status - currenct batch aplied status if   |
 |                   conc. req was started.                                  |
 |                p_request_id  - Request id of conc. request.               |
 |                                                                           |
 | RETURNS    : NONE                                                         |
 |                                                                           |
 | NOTES                                                                     |
 |                                                                           |
 | MODIFICATION HISTORY - Created by Ganesh Vaidee - 10/05/95                |
 |       11/20/1995 -     The procedure now calls the conc. request to start |
 |                        approval or formatting of a batch if need be       |
 |                        depending on the p_call_conc_req flag              |
 |                                                                           |
 +===========================================================================*/
PROCEDURE add_or_rm_txn_from_auto_batch(
        p_ct_id       IN ra_customer_trx.customer_trx_id%TYPE,
        p_ps_id       IN ar_payment_schedules.payment_schedule_id%TYPE,
        p_selected_for_rec_batch_id   IN
                   ar_payment_schedules.selected_for_receipt_batch_id%TYPE,
        p_paying_customer_id IN ra_customer_trx.paying_customer_id%TYPE,
        p_customer_bank_account_id IN
                   ra_customer_trx.customer_bank_account_id%TYPE,
        p_module_name           IN VARCHAR2,
        p_module_version        IN VARCHAR2 ) IS
l_ct_rec    ra_customer_trx%ROWTYPE;
Line: 1019

       arp_standard.debug('add_or_rm_txn_from_auto_batch: ' ||  'p_selected_for_rec_batch_id = '||
                                to_char( p_selected_for_rec_batch_id ) );
Line: 1041

    arp_ct_pkg.update_p( l_ct_rec, l_ct_rec.customer_trx_id );
Line: 1047

    l_ps_rec.selected_for_receipt_batch_id := p_selected_for_rec_batch_id;
Line: 1048

    arp_ps_pkg.update_p( l_ps_rec, l_ps_rec.payment_schedule_id );
Line: 1150

    select rm.name rm_name, b.batch_date batch_date
    from ar_receipt_methods rm,
         ar_batches b
    where b.batch_id = p_batch_id
    AND rm.receipt_method_id = b.receipt_method_id;