DBA Data[Home] [Help]

APPS.JAI_AP_IA_TRIGGER_PKG SQL Statements

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

Line: 26

                        insert, update and delete.

                        Introduced the call to centralized packaged procedure,
                        jai_cmn_utils_pkg.check_jai_exists to check if localization has been installed.

2.        08-Jun-2005   This Object is Modified to refer to New DB Entity names in place of Old
                        DB Entity as required for CASE COMPLAINCE.  Version 116.1

3.      13-Jun-2005    File Version: 116.2
                       Ramananda for bug#4428980. Removal of SQL LITERALs is done

4.			01-FEB-2007			CSahoo for BUG#5631784, Version 120.1
												Forward Porting of ii1 BUG#4742259(TCS solution)
												When an invoice generated during the TCS settlement is paid we update
												the invoice_id column in the jai_rgm_settlements table with the
												corresponding invoice_id.
												Update of invoice_id in jai_rgm_settlements is made when payment_status_flag is
												Y. Previously it was checking if amount_paid is more than invoice_amount.
                        This would not work if there is any discount.
                        The if condition to update invoice_id in jai_rgm_settlements was modified from
												IF nvl(:new.payment_status_flag,'N') <> 'Y' AND nvl(:new.payment_status_flag,'N') = 'Y' to
                        IF nvl(:old.payment_status_flag,'N') <> 'Y' AND nvl(:new.payment_status_flag,'N') = 'Y'
5	29/03/2007	bduvarag for bug#5662741,File version 120.2
		       Forward porting the changes done in 11i bug#5638769

6   15-OCT-2007  Bug 6493858 File version 120.0.12000000.3
                 Removed changes done for bug 5662741 and moved the logic to jai_ap_ida_t.plb.


Dependency:
----------

Sl No. Bug        Dependent on
                  Bug/Patch set    Details
-------------------------------------------------------------------------------------------------
1      3924692    4033992          Call to  jai_cmn_utils_pkg.check_jai_exists, whcih was created thru bug
                                   4033992.
                                   ja_in_util_pkg_s.sql 115.0
                                   ja_in_util_pkg_b.sql 115.0
------------------------------------------------------------------------------------------ */

  --if
  --  jai_cmn_utils_pkg.check_jai_exists (p_calling_object   => 'JA_IN_AP_AIA_AFTER_TRG',
  --                               p_org_id           =>  pr_new.org_id,
  --                               p_set_of_books_id  =>  pr_new.set_of_books_id )
  --  =
  --  FALSE
  --then
    /* India Localization funtionality is not required */
  --  return;
Line: 86

			UPDATE jai_rgm_settlements
				 SET invoice_id            = pr_new.invoice_id,
						 last_updated_by       = fnd_global.user_id,
						 last_update_date      = sysdate
			 WHERE system_invoice_no     = pr_new.invoice_num
				 AND tax_authority_id      = pr_new.vendor_id
				 AND tax_authority_site_id = pr_new.vendor_site_id;
Line: 96

    /* Updated By Wenqiong Zhou for Bug #1168411 BOE enhancement Start*/
  	IF nvl(pr_old.payment_status_flag,'N') <> 'Y' AND nvl(pr_new.payment_status_flag,'N') = 'Y' AND pr_new.invoice_num like 'BOE%' THEN
       UPDATE JAI_CMN_BOE_HDRS hdr
             SET hdr.status = 'AVAILABLE'
                ,last_update_date = SYSDATE
                ,last_update_login = fnd_global.login_id
                ,last_updated_by = fnd_global.user_id
          WHERE hdr.boe_id = to_number(pr_new.reference_key1);
Line: 105

    /* Updated By Wenqiong Zhou for Bug #1168411 BOE enhancement End*/
  end if; /* updating */
Line: 188

                       the actual invoice id update , and hence this package should go along with this trigger

2.      24/05/2005    Ramananda for bug# 4388958 File Version: 116.1
      Changed AP Lookup code from 'TDS' to 'INDIA TDS'
                        Changed AP Lookup code from 'RECEIPT' to 'INDIA TAX INVOICE'

3.      08-Jun-2005   This Object is Modified to refer to New DB Entity names in place of Old
                      DB Entity as required for CASE COMPLAINCE.  Version 116.2

4. 13-Jun-2005    File Version: 116.3
                  Ramananda for bug#4428980. Removal of SQL LITERALs is done

5. 26-Apr-2011    Xiao for bug#12397015,
                  Solution change for Service Tax Point of Taxation.
6. 09-Jun-2011    Qiong.liu for bug#12621302,
                  BOE tax and remaining amount should be 0 if BOE cancelled.

Dependency:
----------
Sl No. Bug        Dependent on
                  Bug/Patch set    Details
-------------------------------------------------------------------------------------------------
1.      3924692    4033992          Call to  jai_cmn_utils_pkg.check_jai_exists, which was created thru bug
                                   4033992.
                                   ja_in_util_pkg_s.sql 115.0
                                   ja_in_util_pkg_b.sql 115.0




------------------------------------------------------------------------------------------ */
 if pv_action = jai_constants.inserting or pv_action = jai_constants.updating then
  ln_org_id := pr_new.org_id;
Line: 268

      /* Updated By Wenqiong Zhou for Bug #1168411 BOE enhancement Start*/
      IF pr_new.invoice_num like 'BOE%' THEN
        --Add by qiong.liu for bug12621302 09-JUN-2011 Begin
        ----------------------------------------------------
        jai_boe_general_pkg.cancelled_boe(pn_boe_id => to_number(pr_new.reference_key1) );
Line: 277

        /*  UPDATE JAI_CMN_BOE_HDRS hdr
             SET hdr.status = 'CANCELLED'
                ,last_update_date = SYSDATE
                ,last_update_login = fnd_global.login_id
                ,last_updated_by = fnd_global.user_id
          WHERE hdr.boe_id = to_number(pr_new.reference_key1);
Line: 288

      /* Updated By Wenqiong Zhou for Bug #1168411 BOE enhancement End*/

    end if;  /* if pr_old.cancelled_date is null and pr_new.cancelled_date is not null then */
Line: 294

  /* Update invoice Ids in TDS tables for TDS invoices */
  if pv_action = jai_constants.inserting and pr_new.source = 'INDIA TDS' then  /* 'TDS' then --Ramanand for bug#4388958 */

    jai_ap_tds_generation_pkg.populate_tds_invoice_id
    (
      p_invoice_id            =>    pr_new.invoice_id,
      p_invoice_num           =>    pr_new.invoice_num,
      p_vendor_id             =>    pr_new.vendor_id,
      p_vendor_site_id        =>    pr_new.vendor_site_id,
      p_process_flag          =>    lv_process_flag,
      p_process_message       =>    lv_process_message
    );
Line: 313

  end if; /* Update invoice Ids in TDS tables for TDS invoices */
Line: 315

  /* Update invoice Ids in Third Party tables for Third Party invoices */
  if pv_action = jai_constants.inserting and pr_new.source = 'INDIA TAX INVOICE' then /* 'RECEIPT' then --Ramanand for bug#4388958 */

     jai_rcv_third_party_pkg.populate_tp_invoice_id
     (
       p_invoice_id           =>    pr_new.invoice_id,
       p_invoice_num          =>    pr_new.invoice_num,
       p_vendor_id            =>    pr_new.vendor_id,
       p_vendor_site_id       =>    pr_new.vendor_site_id,
       p_process_flag         =>    lv_process_flag,
       p_process_message      =>    lv_process_message
     );
Line: 335

  || Update invoice Ids in Third Party tables for Third Party invoices
  */

  /* Deleting */
  if pv_action = jai_constants.deleting  then

    jai_ap_tds_tax_defaultation.process_delete
    (
      p_invoice_id                  =>  pr_old.invoice_id,
      p_process_flag                =>  lv_process_flag,
      P_process_message             =>  lv_process_message
    );