DBA Data[Home] [Help]

APPS.JAI_RCV_RCV_RTV_PKG SQL Statements

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

Line: 120

                added a new column - "NVL(manufacturing, 'N') receiving_org_manufacturing" in the select
             2. Changed the if condition -
                "if  r_iso_from_org_type.source_org_trading = 'Y' and
                    ( r_ja_in_hr_organization_units.receving_org_trading = 'Y'
                      OR
                      r_ja_in_hr_organization_units1.receving_org_trading = 'Y'
                    )
               TO
               "if  r_iso_from_org_type.source_org_trading = 'Y' and
                  ( r_ja_in_hr_organization_units.receving_org_trading = 'Y'
                    OR
                    r_ja_in_hr_organization_units1.receving_org_trading = 'Y'
                    OR                                                           --Added the OR Condition by Ramananda for Bug #4516577
                    r_ja_in_hr_organization_units.receiving_org_manufacturing = 'Y'
                    OR                                                           --Added the OR Condition by Ramananda for Bug #4516577
                    r_ja_in_hr_organization_units1.receiving_org_manufacturing = 'Y'
                  )

             (Functional)  Dependency Due to This Bug
             --------------------------
             jai_rcv_trx_prc.plb  (120.2)
             jai_om_rg.plb        (120.2)

27/07/2005   Ramananda for Bug#4514461, File Version 120.3
             Problem
             -------
             On creating the receipt, system is giving the error - Both Credit and Debit are Zero

             Fix
             ---
             In the Procedure ja_in_receive_rtv_pkg.regime_tax_accounting_interim, before calling ja_in_receipt_accounting_pkg
             Commented the condition -- if (ln_debit is not null or ln_credit is not null) then
             And added the condition -- if (NVL(ln_debit,0) <> 0 OR NVL(ln_credit,0) <> 0) then

             Future Dependency due to this Bug
             ---------------------------------
             None

28/11/2005 Harshita for Bug 4762433, File Version 120.4
           Issue :
           a) lv_source_name was declared with length 15 and assigned the value
              'Purchasing India' which is of length 16 .
           b) Who column information missing in the insert to the table JAI_RCV_REP_ACCRUAL_T.
           Fix :
           a) Modified the size of the variable lv_source_name from 15 to 20.
              Changes made in the post_entries and regime_tax_accounting_interim procedures.
           b) Added the who columns in the insert of JAI_RCV_REP_ACCRUAL_T.
              Change made in the post_entries procedures.
            Future Dependency due to this Bug
            ---------------------------------
             None

30/10/2006 sacsethi for bug 5228046, File version 120.5
            Forward porting the change in 11i bug 5365523 (Additional CVD Enhancement).
            This bug has datamodel and spec changes.

23/02/07      bduvarag for bug#5527885,File version 120.4
               Forward porting the changes done in 11i bug#5478427
	      bduvarag for bug#5632406,File version 120.4
               Forward porting the changes done in 11i bug#5603081
13/04/2007	bduvarag for the Bug#5989740, file version 120.11
		Forward porting the changes done in 11i bug#5907436

25-April-2007   ssawant for bug 5879769 ,File version 120.5
                Forward porting of
		ENH : SERVICE TAX BY INVENTORY ORGANIZATION AND SERVICE TYPE SOLUTION
		from 11.5( bug no 5694855) to R12 (bug no 5879769).

17-aug-2007     vkaranam for bug 6030615,File version 120.11
                Fwdporting of 115 bug 2942973(Interorg)
21-aug-2007     vkaranam for bug 6030615,File version 120.12
                Issue:
                In R12 we should not use org_organization_defintions view as this will cause the performance degradation.
                Changes are done as per the requirement.

03-dec-2007     Eric modified cursor c_ja_in_receipt_tax_lines  and cursor
                c_ja_in_tax_amt_by_account to pick up the exclusive taxes only

18-FEB-2008:     Changes done by nprashar for Bug #6807023. Changed the value of variable lv_organization_type to jai_constants.orgn_type_io;
Line: 263

    select  organization_id,
            location_id,
            transaction_type,
            parent_transaction_type,
            currency_conversion_rate,
            transaction_date,
            parent_transaction_id,
            inventory_item_id,
            inv_item_flag /* Service */
    from    JAI_RCV_TRANSACTIONS
    where   transaction_id = cp_transaction_id;
Line: 276

    select  shipment_header_id,
            shipment_line_id,
            po_distribution_id,
            po_line_location_id,
            -- attribute5, Vijay Shankar for Bug#4346453. RCV DFF Elim. Enh.
            vendor_id
            -- Vijay Shankar for Bug#4346453. RCV DFF Elim. Enh. , upper(attribute_category) attribute_category
            -- , source_document_code
            -- , decode(source_document_code, 'RMA', jai_rcv_trx_processing_pkg.india_rma_receipt,
            --                                      jai_rcv_trx_processing_pkg.india_receipt) attribute_category
    from    rcv_transactions
    where   transaction_id = cp_transaction_id;
Line: 290

    select  from_organization_id,
            to_organization_id
    from    rcv_shipment_lines
    where   shipment_line_id = cp_shipment_line_id;
Line: 296

    select  upper(receipt_source_code) receipt_source_code,
            receipt_num
    from    rcv_shipment_headers
    where   shipment_header_id = cp_shipment_header_id;
Line: 369

  SELECT 'jai_rcv_rcv_rtv_pkg-'||p_transaction_id INTO lv_temp FROM DUAL;
Line: 938

    select  boe_account_id,
            excise_expense_account,
            excise_rcvble_account,
            rtv_expense_account_id,
            nvl(trading, 'N') receving_org_trading,  /* Bug#4171469 */
            NVL(manufacturing, 'N') receiving_org_manufacturing --Added by Ramananda for Bug #4516577
    from    JAI_CMN_INVENTORY_ORGS
    where   organization_id = cp_organization_id
    and     location_id = cp_location_id;
Line: 949

    select  receiving_account_id
    from    rcv_parameters
    Where   organization_id = cp_organization_id;
Line: 954

    select  ap_accrual_account
    from    mtl_parameters
    where   organization_id = cp_organization_id;
Line: 959

    select  accrual_account_id
    from    po_distributions_all
    where   po_distribution_id = cp_po_distribution_id;
Line: 964

    select  accrual_account_id
    from    po_distributions_all
    where   po_distribution_id =
            (
              select max(po_distribution_id)
              from   po_distributions_all
              where  line_location_id = cp_po_line_location_id
            );
Line: 975

    select  interorg_payables_account,
            intransit_inv_account,
            interorg_receivables_account,
            intransit_type,
            fob_point
    from    mtl_interorg_parameters
    where   from_organization_id = cp_from_organization_id
    and     to_organization_id = cp_to_organization_id;
Line: 985

    select   nvl(trading, 'N') source_org_trading  /* Bug#4171469 */
    from    JAI_CMN_INVENTORY_ORGS
    where   organization_id = cp_organization_id;
Line: 1199

    select  jrtl.tax_id tax_id,
            jrtl.tax_type tax_type,
            nvl(jrtl.tax_amount,0) tax_amount,
            jrtl.currency currency,
            nvl(jrtl.vendor_id, 0) vendor_id,
            nvl(jtc.rounding_factor, 0) rounding_factor,
            nvl(jtc.mod_cr_percentage, 0) recoverable,  /* Service */
            nvl(jrtl.modvat_flag, 'N') modvatable /* Service */
            , nvl(tax_types.regime_code, 'XXXX') regime_code    /* Vijay Shankar for Bug#4250236(4245089). VAT Impl. */

    from    JAI_RCV_LINE_TAXES jrtl,
            JAI_CMN_TAXES_ALL jtc
            , jai_regime_tax_types_v tax_types     /*Vijay Shankar for Bug#4250236(4245089). VAT Impl. */
    where   jrtl.shipment_line_id = cp_shipment_line_id
      AND   jrtl.tax_id = jtc.tax_id
      AND   jtc.tax_type = tax_types.tax_type(+)
      AND   NVL(jtc.inclusive_tax_flag,'N')='N'; --add by eric for inclusive tax,picking the exclusive tax only
Line: 1218

    select regime_id
    from   JAI_RGM_DEFINITIONS
    where  regime_code = p_regime_code;
Line: 1223

    select attribute_code regime_tax_type
    from   JAI_RGM_REGISTRATIONS
    where  regime_id = cp_regime_id
    and    registration_type = jai_constants.regn_type_tax_types
    and    attribute_code = cp_tax_type;
Line: 1755

    select  count(boe_id)
    from    JAI_CMN_BOE_MATCHINGS
    where   shipment_line_id  =   cp_shipment_line_id
    and     transaction_id    =   cp_parent_transaction_id;
Line: 1857

  /* If apply relieve BOE has been done successfully, update the boe_applied_flag in ja_in_rcv_transaction */
  if p_process_flag = 'Y' and nvl(p_simulation , 'Y') <> 'Y'  then

    p_codepath := jai_general_pkg.plot_codepath(8, p_codepath); /* 8  */
Line: 1861

    update  JAI_RCV_TRANSACTIONS
    set     boe_applied_flag = 'Y'
    where   transaction_id = p_transaction_id;
Line: 1910

  select boe_id,
         ( nvl(boe_amount, 0) - nvl(amount_applied, 0) - nvl(amount_written_off, 0) )
         available_amount
  from   JAI_CMN_BOE_HDRS  jbh
  where  organization_id =  p_organization_id
  and    ( nvl(boe_amount, 0) - nvl(amount_applied, 0) - nvl(amount_written_off, 0) ) > 0
  and    ( ( nvl(consolidated_flag, 'Y') = 'Y' )
           or
           ( exists ( select '1'
                      from   JAI_CMN_BOE_DTLS
                      where  boe_id = jbh.boe_id
                      and    item_number = cp_inventory_item_id
                     )
           )
         );
Line: 1960

      /* Insert a apply record in JAI_CMN_BOE_MATCHINGS */
      insert into JAI_CMN_BOE_MATCHINGS
      (BOE_MATCHING_ID,
        transaction_id,
        shipment_header_id,
        shipment_line_id,
        boe_id,
        amount,
        creation_date,
        created_by,
        last_update_date,
        last_updated_by
       )
      values
      ( JAI_CMN_BOE_MATCHINGS_S.nextval,
        p_transaction_id,
        p_shipment_header_id,
        p_shipment_line_id,
        cur_available_boe.boe_id,
        ln_boe_amount_to_apply,
        sysdate,
        fnd_global.user_id,
        sysdate,
        fnd_global.user_id
      );
Line: 1987

      /* update the boe header amount */
      update  JAI_CMN_BOE_HDRS
      set     amount_applied = nvl(amount_applied, 0) + ln_boe_amount_to_apply,
              last_update_date = sysdate,
              last_updated_by = fnd_global.user_id,
              last_update_login = fnd_global.user_id
      where   boe_id = cur_available_boe.boe_id;
Line: 2059

    select boe_id, amount
    from   JAI_CMN_BOE_MATCHINGS
    where  shipment_line_id = cp_shipment_line_id
    and    transaction_id =   cp_transaction_id;
Line: 2093

      /* Insert a unapply record in JAI_CMN_BOE_MATCHINGS */
      p_codepath := jai_general_pkg.plot_codepath(6, p_codepath); /* 6  */
Line: 2095

      insert into JAI_CMN_BOE_MATCHINGS
      (BOE_MATCHING_ID,
        transaction_id,
        shipment_header_id,
        shipment_line_id,
        boe_id,
        amount,
        creation_date,
        created_by,
        last_update_date,
        last_updated_by
       )
      values
      ( JAI_CMN_BOE_MATCHINGS_S.nextval,
        p_transaction_id,
        p_shipment_header_id,
        p_shipment_line_id,
        applied_boe_rec.boe_id,
        ln_boe_amount_to_unapply,
        sysdate,
        fnd_global.user_id,
        sysdate,
        fnd_global.user_id
      );
Line: 2120

      /* update the boe header amount */
      p_codepath := jai_general_pkg.plot_codepath(7, p_codepath); /* 7  */
Line: 2122

      update  JAI_CMN_BOE_HDRS
      set     amount_applied = nvl(amount_applied, 0) + ln_boe_amount_to_unapply,
              last_update_date = sysdate,
              last_updated_by = fnd_global.user_id,
              last_update_login = fnd_global.user_id
      where   boe_id = applied_boe_rec.boe_id;
Line: 2216

    select  count(1)
    from    JAI_RCV_REP_ACCRUAL_T
    where   transaction_id = cp_transaction_id;
Line: 2572

      /* Inserting into JAI_RCV_REP_ACCRUAL_T if no record is already inserted */
      p_codepath := jai_general_pkg.plot_codepath(18, p_codepath); /* 18  */
Line: 2580

        insert into JAI_RCV_REP_ACCRUAL_T
        (
          transaction_id,
          accrual_amount,
          -- Harshita, added the 4 parameters below for Bug 4762433
          created_by    ,
          creation_date ,
          last_updated_by,
          last_update_date,
          last_update_login
        )
        values
        (
          p_transaction_id,
          round(nvl(ln_credit, ln_debit)) ,
          fnd_global.user_id,
          sysdate,
          fnd_global.user_id,
          sysdate,
          fnd_global.login_id
        );
Line: 2903

    select regime_id
    from   JAI_RGM_DEFINITIONS
    where  regime_code = p_regime_code;
Line: 2920

    select  jai_cmn_rgm_recording_pkg.get_account
            (
               cp_regime_id,
               cp_organization_type,
               cp_organization_id,
               cp_location_id, /* Location Not for service tax */
               jrtl.tax_type,
               cp_account_name
            )  interim_regime_account,
            sum
            (
             ROUND( --rchandan for bug#6971526
              decode
              (
                nvl(jrtl.currency , cp_func_curr), cp_func_curr,
                nvl(jrtl.tax_amount,0)* cp_tax_apportion_factor,
                nvl(jrtl.tax_amount,0)* cp_tax_apportion_factor * cp_currency_conversion_rate
               ) * --rchandan for bug#6971526 start
							 (decode(jtc.mod_cr_percentage,100,1,jtc.mod_cr_percentage/100)
							 )
							 , NVL(jtc.rounding_factor, 0)
 	             )--rchandan for bug#6971526 end
              ) tax_amount_by_account
    from    JAI_RCV_LINE_TAXES jrtl,
            JAI_CMN_TAXES_ALL jtc
    where   jrtl.shipment_line_id = cp_shipment_line_id
    and     jrtl.tax_id = jtc.tax_id
    and     ( nvl(jtc.mod_cr_percentage,0) between 0 and 100 ) --rchandan for bug#6971526
    and     nvl(jrtl.modvat_flag, 'N') = 'Y'
    and     jrtl.tax_type in
            (
             select jrr.attribute_code
             from   JAI_RGM_DEFINITIONS jr,
                    JAI_RGM_REGISTRATIONS jrr
             where  jr.regime_id = jrr.regime_id
             and    jr.regime_code = p_regime_code
             and    jrr.registration_type = jai_constants.regn_type_tax_types
            )
      AND   NVL(jtc.inclusive_tax_flag,'N')='N' --add by eric for inclusive tax,picking the exclusive tax only
    group by  jai_cmn_rgm_recording_pkg.get_account
            (
               cp_regime_id,
               cp_organization_type,
               cp_organization_id,
               cp_location_id, /* Location Not for service tax */
               jrtl.tax_type,
               cp_account_name
            ) ;
Line: 2971

    select operating_unit
    from   org_organization_definitions
    where  organization_id = cp_organization_id;*/
Line: 2976

    SELECT org_information3 FROM HR_ORGANIZATION_INFORMATION
    WHERE organization_id=cp_organization_id
    AND ORG_INFORMATION_CONTEXT='Accounting Information';