DBA Data[Home] [Help]

APPS.ARP_PROCESS_LINE SQL Statements

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

Line: 57

  arp_ct_pkg.update_p( l_trx_rec,
                       p_customer_trx_id );
Line: 115

     SELECT customer_trx_line_id
     INTO   p_commitment_line_id
     FROM   ra_customer_trx_lines ctl,
            ra_customer_trx ct
     WHERE  ct.customer_trx_id = p_customer_trx_id
     AND    ctl.customer_trx_id = ct.initial_customer_trx_id;
Line: 415

 |   line has been deleted and the transaction only contains a header        |
 |   freight record.							     |
 |                                                                           |
 | SCOPE - PRIVATE                                                           |
 |                                                                           |
 | EXETERNAL PROCEDURES/FUNCTIONS ACCESSED                                   |
 |    arp_util.debug                                                         |
 |                                                                           |
 | ARGUMENTS  : IN:                                                          |
 |                   p_customer_trx_id    				     |
 |                   p_trx_amount         				     |
 |                   p_exchange_rate      				     |
 |                   p_gl_date            				     |
 |              OUT:                                                         |
 |                    None                                                   |
 |                                                                           |
 | RETURNS    : NONE                                                         |
 |                                                                           |
 | NOTES                                                                     |
 |                                                                           |
 | MODIFICATION HISTORY                                                      |
 |     25-JUL-95  Charlie Tomberg     Created                                |
 |                                                                           |
 +===========================================================================*/


PROCEDURE header_freight_only_rules_case(
                               p_customer_trx_id    IN
					  ra_customer_trx.customer_trx_id%type,
                               p_trx_amount         IN number,
                               p_exchange_rate      IN
                                          ra_customer_trx.exchange_rate%type,
	 		       p_gl_date 	    IN
					  ra_cust_trx_line_gl_dist.gl_date%type
					)
                                      IS

   l_trx_rec   ra_customer_trx%rowtype;
Line: 469

       arp_ct_pkg.update_p( l_trx_rec,
                            p_customer_trx_id );
Line: 474

        |   update the account sets to be real dists.		  |
        |   inv rule is cleared by the form at complete time	  |
        |   or when all 'line' lines are deleted 		  |
        |   if rules and freight only invoice. 			  |
        |   Reason is that the Revenue Recognition Program 	  |
        |    cannot handle freight only transactions with rules.  |
        |							  |
        |  There are two dists in this case:			  |
        |   o The REC dist					  |
        |   o The FREIGHT dist					  |
	+---------------------------------------------------------*/

       arp_ctlgd_pkg.set_to_dummy(l_dist_rec);
Line: 502

       arp_ctlgd_pkg.update_f_ct_id(l_dist_rec,
                                    p_customer_trx_id,
                                    null,
                                    null);
Line: 530

 |    val_insert_line			                                     |
 |                                                                           |
 | DESCRIPTION                                                               |
 |    Does validation that is required when a new line is inserted.	     |
 |                                                                           |
 | SCOPE - PRIVATE                                                           |
 |                                                                           |
 | EXETERNAL PROCEDURES/FUNCTIONS ACCESSED                                   |
 |    arp_util.debug                                                         |
 |                                                                           |
 | ARGUMENTS  : IN:                                                          |
 |		      p_line_rec					     |
 |              OUT:                                                         |
 |                    None                                                   |
 |                                                                           |
 | RETURNS    : NONE                                                         |
 |                                                                           |
 | NOTES                                                                     |
 |                                                                           |
 | MODIFICATION HISTORY                                                      |
 |     24-JUL-95  Charlie Tomberg     Created                                |
 |     31-JAN-96  Martin Johnson      Added call to                          |
 |                                    arp_dates.val_gl_periods_for_rules.    |
 |                                    Changed l_line_rec.set_of_books_id to  |
 |                                    arp_global.set_of_books_id.            |
 |     06-FEB-96  Martin Johnson      Don't call val_gl_periods_for_rules    |
 |                                    for CM's because CM module will        |
 |                                    derive the correct values later        |
 |                                                                           |
 +===========================================================================*/


PROCEDURE val_insert_line ( p_line_rec IN ra_customer_trx_lines%rowtype ) IS


BEGIN

   arp_util.debug('arp_process_line.val_insert_line()+');
Line: 588

   arp_util.debug('arp_process_line.val_insert_line()-');
Line: 592

        arp_util.debug('EXCEPTION:  arp_process_line.val_insert_line()');
Line: 595

        arp_util.debug('------ parameters for val_insert_line() -------');
Line: 605

 |    val_update_line			                                     |
 |                                                                           |
 | DESCRIPTION                                                               |
 |    Does validation that is required when a line is updated.		     |
 |                                                                           |
 | SCOPE - PRIVATE                                                           |
 |                                                                           |
 | EXETERNAL PROCEDURES/FUNCTIONS ACCESSED                                   |
 |    arp_util.debug                                                         |
 |                                                                           |
 | ARGUMENTS  : IN:                                                          |
 |		      p_line_rec    - The line rec with the changed colums   |
 |                    p_db_line_rec - The old line record                    |
 |                    p_new_line_rec - Contains old rec + updated columns    |
 |              OUT:                                                         |
 |                    None                                                   |
 |                                                                           |
 | RETURNS    : NONE                                                         |
 |                                                                           |
 | NOTES                                                                     |
 |                                                                           |
 | MODIFICATION HISTORY                                                      |
 |     24-JUL-95  Charlie Tomberg     Created                                |
 |     31-JAN-96  Martin Johnson      Changed l_line_rec.set_of_books_id to  |
 |                                    arp_global.set_of_books_id.            |
 |     06-FEB-96  Martin Johnson      Don't call val_gl_periods_for_rules    |
 |                                    for CM's because CM module will        |
 |                                    derive the correct values later        |
 |                                                                           |
 +===========================================================================*/


PROCEDURE val_update_line ( p_line_rec      IN ra_customer_trx_lines%rowtype,
                            p_db_line_rec   IN ra_customer_trx_lines%rowtype,
                            p_new_line_rec OUT NOCOPY ra_customer_trx_lines%rowtype )
                          IS

   l_errorbuf  varchar2(200);
Line: 648

   arp_util.debug('arp_process_line.val_update_line()+');
Line: 663

         arp_util.debug('EXCEPTION:  arp_process_line.val_update_line()');
Line: 689

   arp_util.debug('arp_process_line.val_update_line()-');
Line: 694

        arp_util.debug('EXCEPTION:  arp_process_line.val_update_line()');
Line: 697

        arp_util.debug('------ parameters for val_update_line() -------');
Line: 717

 |    val_delete_line			                                     |
 |                                                                           |
 | DESCRIPTION                                                               |
 |    Does validation that is required when a line is deleted.		     |
 |                                                                           |
 | SCOPE - PRIVATE                                                           |
 |                                                                           |
 | EXETERNAL PROCEDURES/FUNCTIONS ACCESSED                                   |
 |    arp_util.debug                                                         |
 |                                                                           |
 | ARGUMENTS  : IN:                                                          |
 |		      p_line_rec					     |
 |		      p_complete_flag					     |
 |              OUT:                                                         |
 |                    None                                                   |
 |                                                                           |
 | RETURNS    : NONE                                                         |
 |                                                                           |
 | NOTES                                                                     |
 |                                                                           |
 | MODIFICATION HISTORY                                                      |
 |     24-JUL-95  Charlie Tomberg     Created                                |
 |                                                                           |
 +===========================================================================*/


PROCEDURE val_delete_line ( p_line_rec       IN ra_customer_trx_lines%rowtype,
                            p_complete_flag  IN
                                       ra_customer_trx.complete_flag%type ) IS


BEGIN

   arp_util.debug('arp_process_line.val_delete_line()+');
Line: 757

   arp_util.debug('arp_process_line.val_delete_line()-');
Line: 761

        arp_util.debug('EXCEPTION:  arp_process_line.val_delete_line()');
Line: 764

        arp_util.debug('------ parameters for val_delete_line() -------');
Line: 776

 |    insert_line							     |
 |                                                                           |
 | DESCRIPTION                                                               |
 |    Inserts a record into ra_customer_trx_lines.			     |
 |                                                                           |
 | SCOPE - PUBLIC                                                            |
 |                                                                           |
 | EXETERNAL PROCEDURES/FUNCTIONS ACCESSED                                   |
 |    arp_util.debug                                                         |
 |                                                                           |
 | ARGUMENTS  : IN:                                                          |
 |		      p_form_name					     |
 |		      p_form_version					     |
 |		      p_line_rec					     |
 |		      p_memo_line_type					     |
 |		      p_currency_code					     |
 |              OUT:                                                         |
 |                    p_customer_trx_line_id				     |
 |                    p_rule_start_date                                      |
 |                    p_accounting_rule_duration                             |
 |                    p_status                                               |
 |          IN/ OUT:							     |
 |		      p_gl_date                                              |
 |                    p_trx_date                                             |
 |                                                                           |
 | RETURNS    : NONE                                                         |
 |                                                                           |
 | NOTES                                                                     |
 |                                                                           |
 | MODIFICATION HISTORY                                                      |
 |     24-JUL-95  Charlie Tomberg     Created                                |
 |     15-JAN-96  Martin Johnson      Added call to credit memo module.      |
 |                                    Added OUT NOCOPY parameters            |
 |                                    p_rule_start_date                      |
 |                                      and p_accounting_rule_duration       |
 |     06-FEB-96  Martin Johnson      Don't call tax engine if trx is a      |
 |                                      debit memo reversal                  |
 |     08-FEB-96  Martin Johnson      Call arp_dates.derive_gl_trx_dates_    |
 |                                      from_rules() and added IN OUT NOCOPY |
 |                                      parameters p_gl_date and p_trx_date. |
 |     15-MAY-96  Martin Johnson      BugNo:356814.  Added OUT NOCOPY param  |
 |                                      p_status.  Call calculate_tax_f_ctl_ |
 |                                      id in 'DEFERRED' mode so that        |
 |                                      'soft' exception will be raised.     |
 |     01-JUL-96  Simon Leung         Do not call the tax engine if the      |
 |                                      memo line type is TAX, FREIGHT or    |
 |                                      CHARGES.                             |
 |									     |
 |     Rel 11 Changes:							     |
 |									     |
 |     04-AUG-97  OSTEINME	Added new parameters p_header_currency_code  |
 |						     p_header_exchange_rate  |
 |				changed p_line_rec to IN OUT NOCOPY	     |
 |                                                                           |
 +===========================================================================*/


PROCEDURE insert_line(
               p_form_name             IN varchar2,
               p_form_version          IN number,
               p_line_rec	       IN OUT NOCOPY ra_customer_trx_lines%rowtype,
               p_memo_line_type        IN ar_memo_lines.line_type%type,
               p_customer_trx_line_id  OUT NOCOPY
                               ra_customer_trx_lines.customer_trx_line_id%type,
               p_trx_class             IN ra_cust_trx_types.type%type
                                           DEFAULT NULL,
               p_ccid1                 IN
                                 gl_code_combinations.code_combination_id%type
                                 DEFAULT NULL,
               p_ccid2                 IN
                                 gl_code_combinations.code_combination_id%type
                                 DEFAULT NULL,
               p_amount1               IN ra_cust_trx_line_gl_dist.amount%type
                                           DEFAULT NULL,
               p_amount2               IN ra_cust_trx_line_gl_dist.amount%type
                                          DEFAULT NULL,
               p_rule_start_date       OUT NOCOPY
                                 ra_customer_trx_lines.rule_start_date%type,
               p_accounting_rule_duration OUT NOCOPY
                         ra_customer_trx_lines.accounting_rule_duration%type,
               p_gl_date               IN OUT NOCOPY
                         ra_cust_trx_line_gl_dist.gl_date%type,
               p_trx_date              IN OUT NOCOPY
                         ra_customer_trx.trx_date%type,
	       p_header_currency_code  IN
				ra_customer_trx.invoice_currency_code%type
				DEFAULT NULL,
	       p_header_exchange_rate  IN ra_customer_trx.exchange_rate%type
				DEFAULT NULL,
               p_status                OUT NOCOPY varchar2,
               p_run_autoacc_flag      IN varchar2  DEFAULT 'Y',
               p_run_tax_flag          IN varchar2  DEFAULT 'Y',
               p_create_salescredits_flag IN VARCHAR2 DEFAULT 'Y'  )

IS

      l_ccid		       number;
Line: 912

      arp_util.debug('arp_process_line.insert_line()+');
Line: 930

      arp_process_line.val_insert_line(p_line_rec);
Line: 948

       |  Call the table handler to insert the line   |
       +----------------------------------------------*/

    arp_util.debug('ARTECTLB: l_line_rec.amount_includes_tax_flag = ' || l_line_rec.amount_includes_tax_flag);
Line: 953

      arp_ctl_pkg.insert_p( l_line_rec,
                            l_customer_trx_line_id);
Line: 1011

              'arp_process_line.insert_line before create_tax_f_ctl_id');
Line: 1031

      l_mode := 'INSERT_NO_TAX';
Line: 1032

      arp_util.debug('Overridding mode to INSERT_NO_TAX');
Line: 1034

      l_mode := 'INSERT';
Line: 1059

              'arp_process_line.insert_line after create_tax_f_ctl_id');
Line: 1081

            arp_process_debit_memo.line_post_insert(
                                                     l_customer_trx_line_id,
                                                     p_ccid1,
                                                     p_ccid2,
                                                     p_amount1,
                                                     p_amount2
                                                   );
Line: 1101

              'arp_process_line.insert_line before credit_transactions');
Line: 1116

              'arp_process_line.insert_line after credit_transactions');
Line: 1188

      /* Check if any gl_dist rows are inserted for the current trx_line.*/

	BEGIN
	  SELECT customer_trx_line_id
	  INTO   l_dist_line
	  FROM   ra_cust_trx_line_gl_dist
	  WHERE  customer_trx_line_id = p_customer_trx_line_id
	  AND    account_set_flag     = 'N'
	  AND    ROWNUM               < 2;
Line: 1209

        ARP_CTLGD_PKG.update_f_ctl_id(l_dist_rec,p_customer_trx_line_id,'N','');
Line: 1213

        cursor c1 is select customer_trx_line_id
                     from ra_customer_trx_lines
                     where link_to_cust_trx_line_id = p_customer_trx_line_id;
Line: 1223

               ARP_CTLGD_PKG.update_f_ctl_id(l_dist_rec,l_id,'N','');
Line: 1247

      arp_util.debug('arp_process_line.insert_line()-');
Line: 1260

        arp_util.debug('EXCEPTION:  arp_process_line.insert_line()');
Line: 1263

        arp_util.debug('---------- parameters for insert_line() ---------');
Line: 1279

 |    update_line			                                     |
 |                                                                           |
 | DESCRIPTION                                                               |
 |    Updates a ra_customer_trx_lines record				     |
 |                                                                           |
 | SCOPE - PUBLIC                                                            |
 |                                                                           |
 | EXETERNAL PROCEDURES/FUNCTIONS ACCESSED                                   |
 |    arp_util.debug                                                         |
 |                                                                           |
 | ARGUMENTS  : IN:                                                          |
 |		      p_form_name					     |
 |		      p_form_version					     |
 |		      p_customer_trx_line_id 				     |
 |                    p_line_rec					     |
 |		      p_foreign_currency_code				     |
 |		      p_exchange_rate 					     |
 |		      p_recalculate_tax_flag				     |
 |		      p_rerun_autoacc_flag				     |
 |              OUT:                                                         |
 |                    p_rule_start_date                                      |
 |                    p_accounting_rule_duration                             |
 |                    p_status                                               |
 |           IN OUT:                                                         |
 |                    p_gl_date                                              |
 |                    p_trx_date                                             |
 |                                                                           |
 | RETURNS    : NONE                                                         |
 |                                                                           |
 | NOTES                                                                     |
 |                                                                           |
 | MODIFICATION HISTORY                                                      |
 |     24-JUL-95  Charlie Tomberg     Created                                |
 |     17-JAN-96  Martin Johnson      Added call to credit memo module.      |
 |                                    Added OUT NOCOPY parameters            |
 |                                    p_rule_start_date                      |
 |                                    and p_accounting_rule_duration         |
 |     13-FEB-96  Martin Johnson      Added OUT NOCOPY parameters p_gl_date  |
 |                                    and  p_trx_date                        |
 |     20-MAR-96  Martin Johnson      Rewrote algorithm to figure out NOCOPY |
 |                                    whether to call CM module, autoacc, or |
 |                                    dist table handler to update           |
 |                                    distributions                          |
 |     20-MAY-96  Martin Johnson      BugNo:356814.  Added OUT NOCOPY        |
 |                                    parameter p_status.  Call tax engine   |
 |                                    in 'DEFERRED' mode so that 'soft'      |
 |                                    excpetion will be raise.               |
 |                                                                           |
 +===========================================================================*/


PROCEDURE update_line(
                p_form_name	        IN varchar2,
                p_form_version          IN number,
                p_customer_trx_line_id  IN
                              ra_customer_trx_lines.customer_trx_line_id%type,
                p_line_rec	        IN OUT NOCOPY ra_customer_trx_lines%rowtype,
                p_foreign_currency_code IN fnd_currencies.currency_code%type,
		p_exchange_rate         IN ra_customer_trx.exchange_rate%type,
                p_recalculate_tax_flag  IN boolean,
                p_rerun_autoacc_flag    IN boolean,
                p_rule_start_date       OUT NOCOPY
                                 ra_customer_trx_lines.rule_start_date%type,
                p_accounting_rule_duration OUT NOCOPY
                         ra_customer_trx_lines.accounting_rule_duration%type,
                p_gl_date                IN OUT NOCOPY
                         ra_cust_trx_line_gl_dist.gl_date%type,
                p_trx_date               IN OUT NOCOPY
                         ra_customer_trx.trx_date%type,
                p_status                 OUT NOCOPY varchar2 )
IS

      l_recalculate_tax_flag      boolean;
Line: 1392

SELECT 'Y'
FROM ra_customer_trx_lines    l,
     ra_cust_trx_line_gl_dist d
WHERE l.customer_trx_line_id = p_customer_trx_line_id
AND   l.customer_trx_id      = d.customer_trx_id
AND   d.account_set_flag     = 'N'
AND   d.posting_Control_id  <> -3;
Line: 1404

      arp_util.debug('arp_process_line.update_line()+');
Line: 1431

      arp_process_line.val_update_line(p_line_rec,
                                       l_db_line_rec,
                                       l_new_line_rec);
Line: 1465

        arp_etax_services_pkg.before_update_line(
                       l_db_line_rec.customer_trx_line_id,
                       p_line_rec,
                       l_recalculate_tax_flag);
Line: 1477

            'arp_etax_services_pkg.before_update_line raised exception');
Line: 1493

	 -- set net amounts and gross amounts to AR_NUMBER_DUMMY to avoid update

	 p_line_rec.extended_amount := AR_NUMBER_DUMMY;
Line: 1503

       |  Call the table handler to update the line  |
       +---------------------------------------------*/

      arp_ctl_pkg.update_p( p_line_rec,
                            p_customer_trx_line_id,
                            p_foreign_currency_code );
Line: 1539

          | Call Tax Engine, recalculating tax for this updated invoice line.|
          +------------------------------------------------------------------*/

         BEGIN

	   -- Rel. 11 call to new tax engine:

	   -- copy entered amounts into parameters

	   l_extended_amount := p_line_rec.extended_amount;
Line: 1556

                       p_mode => 'UPDATE');
Line: 1564

                    p_action =>  'UPDATE',
                    p_line_level_action => 'UPDATE');
Line: 1594

       |  Update the salescredit lines associated with this transaction line |
       +---------------------------------------------------------------------*/

      IF   ( l_amount_changed_flag  = TRUE )
      THEN arp_ctls_pkg.update_amounts_f_ctl_id(p_customer_trx_line_id,
		                                l_new_line_rec.extended_amount,
                                                p_foreign_currency_code );
Line: 1607

       |    THEN call CM module to update the distributions        |
       |  ELSIF rerun_autoacc is TRUE                              |
       |    THEN call autoaccounting to update the distributions   |
       |  ELSIF amount changed                                     |
       |    THEN update the distribution amounts                   |
       +-----------------------------------------------------------*/

      IF ( ( p_line_rec.previous_customer_trx_id IS NOT NULL )
           AND
           ( ( p_rerun_autoacc_flag )
             OR
             ( ( p_line_rec.accounting_rule_id IS NOT NULL )
               AND
               ( l_amount_changed_flag OR l_last_period_changed_flag )
             )
           )
         )
        THEN
          BEGIN
            arp_credit_memo_module.credit_transactions(
	                      p_line_rec.customer_trx_id,
                              p_customer_trx_line_id,
                              p_line_rec.previous_customer_trx_id,
                              p_line_rec.previous_customer_trx_line_id,
                              null,
                              l_failure_count,
                              l_rule_start_date,
                              l_accounting_rule_duration,
                              'U' );
Line: 1668

            arp_ctlgd_pkg.update_amount_f_ctl_id(
				             p_customer_trx_line_id,
 				             l_new_line_rec.extended_amount,
				             p_foreign_currency_code,
                	       	             pg_base_curr_code,
				             p_exchange_rate,
                                             pg_base_precision,
				             pg_base_min_acct_unit );
Line: 1696

      /* Check if any gl_dist rows are inserted for the current trx_line.*/

    BEGIN
      SELECT customer_trx_line_id
      INTO   l_dist_line
      FROM   ra_cust_trx_line_gl_dist
      WHERE  customer_trx_line_id = p_customer_trx_line_id
      AND    account_set_flag     = 'N'
      AND    ROWNUM               < 2;
Line: 1719

          ARP_CTLGD_PKG.update_f_ctl_id(l_dist_rec,p_customer_trx_line_id,'N','');
Line: 1722

	     linked to the line updated above apart from the REC row*/
          DECLARE
          cursor c1 is select customer_trx_line_id
                       from ra_customer_trx_lines
	               where link_to_cust_trx_line_id = p_customer_trx_line_id;
Line: 1734

               ARP_CTLGD_PKG.update_f_ctl_id(l_dist_rec,l_id,'N','');
Line: 1763

      arp_util.debug('arp_process_line.update_line()-');
Line: 1768

        arp_util.debug('EXCEPTION:  arp_process_line.update_line()');
Line: 1771

        arp_util.debug('---------- parameters for update_line() ---------');
Line: 1794

 |    delete_line			                                     |
 |                                                                           |
 | DESCRIPTION                                                               |
 |    Deletes records from ra_customer_trx_lines			     |
 |                                                                           |
 | SCOPE - PUBLIC                                                            |
 |                                                                           |
 | EXETERNAL PROCEDURES/FUNCTIONS ACCESSED                                   |
 |    arp_util.debug                                                         |
 |                                                                           |
 | ARGUMENTS  : IN:                                                          |
 |		      p_form_name					     |
 |		      p_form_version					     |
 |		      p_customer_trx_line_id				     |
 |                    p_complete_flag 					     |
 |		      p_recalculate_tax_flag 				     |
 |		      p_trx_amount   					     |
 |		      p_exchange_rate					     |
 |                    p_line_rec 					     |
 |              IN / OUT:                                                    |
 |                    p_gl_date						     |
 |                    p_trx_date					     |
 |              OUT:                                                         |
 |                    p_status                                               |
 |                                                                           |
 | RETURNS    : NONE                                                         |
 |                                                                           |
 | NOTES                                                                     |
 |                                                                           |
 | MODIFICATION HISTORY                                                      |
 |     24-JUL-95  Charlie Tomberg     Created                                |
 |     15-MAR-96  Martin Johnson      Delete from ar_credit_memo_amounts if  |
 |                                    the transaction is a credit memo with  |
 |                                    rules.                                 |
 |                                    Do not derive gl and trx dates for CM's|
 |     20-MAY-96  Martin Johnson      BugNo:356814.  Added OUT NOCOPY parameter     |
 |                                      p_status.  Call tax engine in        |
 |                                      'DEFERRED' mode so that 'soft'       |
 |                                      excpetion will be raise.             |
 |  21-OCT-1997		OSTEINME      Bug 565566:
 |				      added call to procedure
 |				      arp_ctlgd_pkg.delete_f_ct_ltctl_id_type
 |                                                                           |
 +===========================================================================*/


PROCEDURE delete_line(p_form_name		IN varchar2,
                       p_form_version		IN number,
                       p_customer_trx_line_id	IN
                               ra_customer_trx_lines.customer_trx_line_id%type,
                       p_complete_flag   IN ra_customer_trx.complete_flag%type,
		       p_recalculate_tax_flag  	IN boolean,
                       p_trx_amount         	IN number,
                       p_exchange_rate  IN ra_customer_trx.exchange_rate%type,
		       p_header_currency_code IN fnd_currencies.currency_code%type,
	 	       p_gl_date  IN OUT NOCOPY ra_cust_trx_line_gl_dist.gl_date%type,
	 	       p_trx_date IN OUT NOCOPY ra_customer_trx.trx_date%type,
                       p_line_rec    IN ra_customer_trx_lines%rowtype,
                       p_status OUT NOCOPY varchar2 ) IS

   l_recalculate_tax_flag boolean;
Line: 1861

     select alc.customer_trx_line_id
     from  ra_customer_trx_lines ctl,
           ar_line_conts alc
     where
     ctl.customer_trx_line_id = p_customer_trx_line_id
     and ctl.customer_trx_line_id = alc.customer_trx_line_id
     and ctl.line_type = 'LINE'
     FOR UPDATE OF alc.customer_trx_line_id NOWAIT;
Line: 1871

     select customer_trx_line_id
     from  ar_deferred_lines
     where customer_trx_line_id = p_customer_trx_line_id
     FOR UPDATE OF customer_trx_line_id NOWAIT;
Line: 1877

   arp_util.debug('arp_process_line.delete_line()+');
Line: 1892

      arp_process_line.val_delete_line(p_line_rec,
                                       p_complete_flag);
Line: 1908

       arp_etax_services_pkg.before_delete_line(
              p_customer_trx_line_id =>   p_customer_trx_line_id,
              p_customer_trx_id      =>   p_line_rec.customer_trx_id);
Line: 1914

        |  Delete the account assignments associated with   |
        |  the freight line.        			    |
        +---------------------------------------------------*/

      arp_ctlgd_pkg.delete_f_ct_ltctl_id_type(
		p_line_rec.customer_trx_id,
		p_customer_trx_line_id,
		'FREIGHT',
		NULL,
		NULL);
Line: 1926

        |  Delete the tax and freight lines that are associated with this  |
        |  line of type LINE.						   |
        +------------------------------------------------------------------*/

      arp_ctl_pkg.delete_f_ltctl_id( p_customer_trx_line_id );
Line: 1933

        |  Delete the salescredits associated with this line.  |
        +------------------------------------------------------*/

      arp_ctls_pkg.delete_f_ctl_id( p_customer_trx_line_id );
Line: 1940

        |  Delete the account assignments and account sets  |
        |  associated with this line. 			    |
        +---------------------------------------------------*/

      arp_ctlgd_pkg.delete_f_ctl_id( p_customer_trx_line_id,
				     null,
				     null );
Line: 1949

       |  Delete from ar_credit_memo_amounts if the transaction is  |
       |  a credit memo with rules.                                 |
       +------------------------------------------------------------*/

      IF ( (p_line_rec.previous_customer_trx_line_id IS NOT NULL) AND
           (p_line_rec.accounting_rule_id IS NOT NULL ) )
        THEN
          arp_cma_pkg.delete_f_ctl_id( p_customer_trx_line_id );
Line: 1962

                  delete from ar_line_conts
                  where customer_trx_line_id = l_cont_rec.customer_trx_line_id;
Line: 1967

                  delete from ar_deferred_lines
                  WHERE  customer_trx_line_id = l_deferred_rec.customer_trx_line_id;
Line: 1979

       |  call the table-handler to delete the line record  |
       +-----------------------------------------------------*/

      arp_ctl_pkg.delete_p( p_customer_trx_line_id );
Line: 1987

       | of the rule schedule of the line that has just been deleted.       |
       | arp_dates.derive_gl_trx_dates_from_rules() rederives and resets    |
       | the trx_date and gl_date.					    |
       |								    |
       | If the line that was deleted was the last line on a transaction    |
       | that has header freight and rules, the transaction is no longer    |
       | valid because header freight only transactions cannot have rules.  |
       | header_freight_only_rules_case() converts the transaction to one   |
       | without rules in this case.					    |
       +--------------------------------------------------------------------*/

      IF (p_line_rec.accounting_rule_id IS NOT NULL )
      THEN

            IF ( p_line_rec.previous_customer_trx_line_id IS NULL )
              THEN
       	        arp_dates.derive_gl_trx_dates_from_rules(
                                                 p_line_rec.customer_trx_id,
 			                         p_gl_date,
			                         p_trx_date,
                                                 l_recalculate_tax_flag);
Line: 2019

       THEN -- salestax delete
            -- call header tax in update mode if the trx_date has changed
            --      (the tax may not be valid for the new trx_date)
            null;
Line: 2025

      arp_util.debug('arp_process_line.delete_line()-');
Line: 2034

        arp_util.debug('EXCEPTION:  arp_process_line.delete_line()');
Line: 2037

        arp_util.debug('---------- parameters for delete_line() ---------');