DBA Data[Home] [Help]

APPS.FA_CALC_DEPRN_BASIS2_PKG SQL Statements

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

Line: 60

         fa_cache_pkg.fazcdrd_record.period_update_flag = 'Y') and   -- ENERGY
         (px_rule_in.event_type <> 'AMORT_ADJ3') then                -- ENERGY
     --                                                              -- ENERGY
     -- There should be no EXPENSED ADJUSTMENT for now and CURRRENT  -- ENERGY
     -- period amortized adjustment is only allowed.                 -- ENERGY
     --                                                              -- ENERGY
     if px_rule_in.recoverable_cost = 0 then
        px_rule_out.new_adjusted_cost := 0;
Line: 95

     fa_debug_pkg.add('NSF', 'fa_cache_pkg.fazcdrd_record.period_update_flag',
                       fa_cache_pkg.fazcdrd_record.period_update_flag, p_log_level_rec);
Line: 133

	SELECT rate_in_use
	INTO l_rate_in_use
	FROM fa_books
	WHERE asset_id = px_rule_in.asset_id
	AND book_type_code = px_rule_in.book_type_code
	AND date_ineffective is null;
Line: 227

   select nvl(deprn_reserve,0), nvl(ytd_deprn,0)
     from fa_deprn_summary
    where asset_id = px_rule_in.asset_id
      and period_counter = l_amort_period;
Line: 233

   select nvl(deprn_reserve,0), nvl(ytd_deprn,0)
     from fa_deprn_summary_mrc_v
    where asset_id = px_rule_in.asset_id
      and period_counter = l_amort_period;
Line: 240

          select nvl(bk.recoverable_cost,0),
	         nvl(bk.adjusted_cost,0),
	         nvl(bk.salvage_value,0),
		 bk.deprn_method_code,
		 dm.deprn_basis_rule,
		 dm.rate_source_rule,
 	  -----------------------------------------
	  -- Added following two columns
	  -- to fix bug 2303276
	  -----------------------------------------
		 nvl(bk.adjusted_recoverable_cost,0),
		 nvl(bk.cost,0)
	  from	 FA_BOOKS bk, FA_METHODS dm
	  where	 bk.deprn_method_code = dm.method_code
	  and	 nvl(bk.life_in_months, 0) = nvl(dm.life_in_months,0)
	  and	 bk.asset_id = px_rule_in.asset_id
	  and	 bk.book_type_code = px_rule_in.book_type_code
	  and	 bk.transaction_header_id_out is null;
Line: 261

          select nvl(bk.recoverable_cost,0),
	         nvl(bk.adjusted_cost,0),
	         nvl(bk.salvage_value,0),
		 bk.deprn_method_code,
		 dm.deprn_basis_rule,
		 dm.rate_source_rule,
		 nvl(bk.adjusted_recoverable_cost,0),
		 nvl(bk.cost,0)
	  from	 FA_BOOKS_MRC_V bk, FA_METHODS dm
	  where	 bk.deprn_method_code = dm.method_code
	  and	 nvl(bk.life_in_months, 0) = nvl(dm.life_in_months,0)
	  and	 bk.asset_id = px_rule_in.asset_id
	  and	 bk.book_type_code = px_rule_in.book_type_code
	  and	 bk.transaction_header_id_out is null;
Line: 278

  select ap.period_counter
    from fa_deprn_periods ap
   where ap.book_type_code = px_rule_in.book_type_code
    and  ap.calendar_period_open_date
			<= trunc(px_rule_in.amortization_start_date)
    and nvl(ap.calendar_period_close_date,sysdate)
			>= trunc(px_rule_in.amortization_start_date);
Line: 289

  select nvl(h.amortization_start_date,h.transaction_date_entered),
         nvl(bk.cost,0)
  from fa_transaction_headers	h,
       fa_books			bk
  where h.transaction_header_id =
          (select max(transaction_header_id_out)
	   from fa_books	b,
		fa_methods	m
	  where b.book_type_code = px_rule_in.book_type_code
	    and b.asset_id = px_rule_in.asset_id
	    and b.deprn_method_code = m.method_code
	    and m.deprn_basis_rule = 'NBV')
   and bk.book_type_code = px_rule_in.book_type_code
   and bk.asset_id = px_rule_in.asset_id
   and bk.transaction_header_id_in = h.transaction_header_id;
Line: 307

  select nvl(h.amortization_start_date,h.transaction_date_entered),
         nvl(bk.cost,0)
  from fa_transaction_headers	h,
       fa_books			bk
  where h.transaction_header_id =
          (select max(transaction_header_id_out)
	   from fa_books_mrc_v	b,
		fa_methods	m
	  where b.book_type_code = px_rule_in.book_type_code
	    and b.asset_id = px_rule_in.asset_id
	    and b.deprn_method_code = m.method_code
	    and m.deprn_basis_rule = 'NBV')
   and bk.book_type_code = px_rule_in.book_type_code
   and bk.asset_id = px_rule_in.asset_id
   and bk.transaction_header_id_in = h.transaction_header_id;
Line: 326

  select nvl(deprn_reserve,0) - nvl(ytd_deprn,0)
    from fa_deprn_summary
   where book_type_code = px_rule_in.book_type_code
     and asset_id = px_rule_in.asset_id
     and period_counter =
		(select period_counter
		   from fa_deprn_periods
		  where book_type_code = px_rule_in.book_type_code
		    and calendar_period_open_date <= p_method_change_date
		    and nvl(calendar_period_close_date,sysdate) >= p_method_change_date);
Line: 339

  select nvl(deprn_reserve,0) - nvl(ytd_deprn,0)
    from fa_deprn_summary_mrc_v
   where book_type_code = px_rule_in.book_type_code
     and asset_id = px_rule_in.asset_id
     and period_counter =
		(select period_counter
		   from fa_deprn_periods
		  where book_type_code = px_rule_in.book_type_code
		    and calendar_period_open_date <= p_method_change_date
		    and nvl(calendar_period_close_date,sysdate) >= p_method_change_date);
Line: 355

    select exclude_fully_rsv_flag
    from   FA_BOOKS BK
    where  BK.ASSET_ID = px_rule_in.asset_id
    and    BK.BOOK_TYPE_CODE = px_rule_in.book_type_code
    and    BK.TRANSACTION_HEADER_ID_OUT is null;
Line: 363

    select exclude_fully_rsv_flag
    from   FA_BOOKS_MRC_V BK
    where  BK.ASSET_ID = px_rule_in.asset_id
    and    BK.BOOK_TYPE_CODE = px_rule_in.book_type_code
    and    BK.TRANSACTION_HEADER_ID_OUT is null;
Line: 371

    select nvl(sum(TRC.adjusted_cost),0)     fully_rsv_adjusted_cost,
           nvl(sum(TRC.salvage_value),0)     fully_rsv_salvage_value,
           nvl(sum(TRC.recoverable_cost),0)  fully_rsv_recoverable_cost,
           nvl(sum(TRC.deprn_reserve),0)     fully_rsv_deprn_reserve
    from   FA_TRACK_MEMBERS TRC
    where  TRC.GROUP_ASSET_ID = px_rule_in.asset_id
    and    TRC.PERIOD_COUNTER <= p_period_counter
    and    TRC.FULLY_RESERVED_FLAG='Y'
    and    nvl(TRC.SET_OF_BOOKS_ID,-99) = nvl(h_set_of_books_id,-99) /*Bug# 6933726 Added filter conition for MRC */
    and    TRC.MEMBER_ASSET_ID is not null;
Line: 384

    select nvl(sum(TRC.adjusted_cost),0)     fully_rsv_adjusted_cost,
           nvl(sum(TRC.salvage_value),0)     fully_rsv_salvage_value,
           nvl(sum(TRC.recoverable_cost),0)  fully_rsv_recoverable_cost,
           nvl(sum(TRC.deprn_reserve),0)     fully_rsv_deprn_reserve
    from   FA_TRACK_MEMBERS TRC
    where  TRC.GROUP_ASSET_ID = px_rule_in.asset_id
    and    TRC.PERIOD_COUNTER = p_period_counter
    and    TRC.FULLY_RESERVED_FLAG='Y'
    and    nvl(TRC.SET_OF_BOOKS_ID,-99) = nvl(h_set_of_books_id,-99) /*Bug# 6933726 Added filter conition for MRC */
    and    TRC.MEMBER_ASSET_ID is not null;
Line: 397

    select min(TRC.period_counter)
    from   FA_TRACK_MEMBERS TRC
    where  TRC.GROUP_ASSET_ID = px_rule_in.asset_id
    and    TRC.MEMBER_ASSET_ID is not null
    and    nvl(TRC.SET_OF_BOOKS_ID,-99) = nvl(h_set_of_books_id,-99); /*Bug# 6933726 Added filter conition for MRC */
Line: 405

    select nvl(sum(BK.adjusted_cost),0)     fully_rsv_adjusted_cost,
           nvl(sum(BK.salvage_value),0)     fully_rsv_salvage_value,
           nvl(sum(BK.recoverable_cost),0)  fully_rsv_recoverable_cost,
           nvl(sum(DS.deprn_reserve),0)     fully_rsv_deprn_reserve
    from   FA_BOOKS BK,
           FA_DEPRN_SUMMARY DS
    where  BK.ASSET_ID = DS.ASSET_ID
    and    BK.BOOK_TYPE_CODE = DS.BOOK_TYPE_CODE
    and    BK.PERIOD_COUNTER_FULLY_RESERVED = DS.PERIOD_COUNTER
    and    BK.GROUP_ASSET_ID = px_rule_in.asset_id
    and    BK.BOOK_TYPE_CODE = px_rule_in.book_type_code
    and    nvl(BK.PERIOD_COUNTER_FULLY_RESERVED,p_period_counter)
                                                < p_period_counter
    and    BK.PERIOD_COUNTER_FULLY_RETIRED is null
    and    BK.DATE_INEFFECTIVE is null;
Line: 423

    select nvl(sum(BK.adjusted_cost),0)     fully_rsv_adjusted_cost,
           nvl(sum(BK.salvage_value),0)     fully_rsv_salvage_value,
           nvl(sum(BK.recoverable_cost),0)  fully_rsv_recoverable_cost,
           nvl(sum(DS.deprn_reserve),0)     fully_rsv_deprn_reserve
    from   FA_BOOKS_MRC_V BK,
           FA_DEPRN_SUMMARY_MRC_V DS
    where  BK.ASSET_ID = DS.ASSET_ID
    and    BK.BOOK_TYPE_CODE = DS.BOOK_TYPE_CODE
    and    BK.PERIOD_COUNTER_FULLY_RESERVED = DS.PERIOD_COUNTER
    and    BK.GROUP_ASSET_ID = px_rule_in.asset_id
    and    BK.BOOK_TYPE_CODE = px_rule_in.book_type_code
    and    nvl(BK.PERIOD_COUNTER_FULLY_RESERVED,p_period_counter)
                                                < p_period_counter
    and    BK.PERIOD_COUNTER_FULLY_RETIRED is null
    and    BK.DATE_INEFFECTIVE is null;
Line: 441

    select nvl(sum(BK.adjusted_cost),0)     fully_rsv_adjusted_cost,
           nvl(sum(BK.salvage_value),0)     fully_rsv_salvage_value,
           nvl(sum(BK.recoverable_cost),0)  fully_rsv_recoverable_cost
    from   FA_BOOKS BK
    where  BK.GROUP_ASSET_ID = px_rule_in.asset_id
    and    BK.BOOK_TYPE_CODE = px_rule_in.book_type_code
    and    BK.PERIOD_COUNTER_FULLY_RESERVED = p_period_counter
    and    BK.DATE_INEFFECTIVE is null;
Line: 452

    select nvl(sum(BK.adjusted_cost),0)     fully_rsv_adjusted_cost,
           nvl(sum(BK.salvage_value),0)     fully_rsv_salvage_value,
           nvl(sum(BK.recoverable_cost),0)  fully_rsv_recoverable_cost
    from   FA_BOOKS_MRC_V BK
    where  BK.GROUP_ASSET_ID = px_rule_in.asset_id
    and    BK.BOOK_TYPE_CODE = px_rule_in.book_type_code
    and    BK.PERIOD_COUNTER_FULLY_RESERVED = p_period_counter
    and    BK.DATE_INEFFECTIVE is null;
Line: 463

    select nvl(sum(BK.adjusted_cost),0)     fully_rsv_adjusted_cost,
           nvl(sum(BK.salvage_value),0)     fully_rsv_salvage_value,
           nvl(sum(BK.recoverable_cost),0)  fully_rsv_recoverable_cost
    from   FA_BOOKS BK
    where  BK.GROUP_ASSET_ID = px_rule_in.asset_id
    and    BK.BOOK_TYPE_CODE = px_rule_in.book_type_code
    and    BK.PERIOD_COUNTER_FULLY_RESERVED <= p_period_counter
    and    BK.DATE_INEFFECTIVE is null;
Line: 474

    select nvl(sum(BK.adjusted_cost),0)     fully_rsv_adjusted_cost,
           nvl(sum(BK.salvage_value),0)     fully_rsv_salvage_value,
           nvl(sum(BK.recoverable_cost),0)  fully_rsv_recoverable_cost
    from   FA_BOOKS_MRC_V BK
    where  BK.GROUP_ASSET_ID = px_rule_in.asset_id
    and    BK.BOOK_TYPE_CODE = px_rule_in.book_type_code
    and    BK.PERIOD_COUNTER_FULLY_RESERVED <= p_period_counter
    and    BK.DATE_INEFFECTIVE is null;
Line: 486

    select nvl(BK1.ADJUSTED_COST,0) - nvl(BK2.ADJUSTED_COST,0)
    from   FA_BOOKS BK1,
           FA_BOOKS BK2
    where  BK1.TRANSACTION_HEADER_ID_OUT = px_rule_in.member_transaction_header_id
    and    BK1.GROUP_ASSET_ID is not null
    and    BK2.TRANSACTION_HEADER_ID_IN = px_rule_in.member_transaction_header_id
    and    BK2.GROUP_ASSET_ID is not null;
Line: 497

    select nvl(BK1.ADJUSTED_COST,0) - nvl(BK2.ADJUSTED_COST,0)
    from   FA_BOOKS_MRC_V BK1,
           FA_BOOKS_MRC_V BK2
    where  BK1.TRANSACTION_HEADER_ID_OUT = px_rule_in.member_transaction_header_id
    and    BK1.GROUP_ASSET_ID is not null
    and    BK2.TRANSACTION_HEADER_ID_IN = px_rule_in.member_transaction_header_id
    and    BK2.GROUP_ASSET_ID is not null;
Line: 737

           	 -- Select Method Change Date and Cost at Method Change
                 OPEN  C_MTC_BOOK;
Line: 748

           	 -- Select Method Change Date and Cost at Method Change
                 OPEN  C_MTC_BOOK_M;
Line: 847

        else -- period update

           px_rule_out.new_adjusted_cost :=px_rule_in.old_adjusted_cost;
Line: 1169

    select nvl(sum(DECODE(ADJ.ADJUSTMENT_TYPE,
                           'RESERVE',
                           decode(adj.debit_credit_flag,
                           'DR',adj.adjustment_amount,
                           'CR',-adj.adjustment_amount))),0) current_period_reserve
    from   fa_adjustments adj
    where  adj.asset_id = px_rule_in.asset_id
    and    adj.book_type_code = px_rule_in.book_type_code
    and    adj.period_counter_created = px_rule_in.period_counter
    ;
Line: 1181

    select nvl(sum(DECODE(ADJ.ADJUSTMENT_TYPE,
                           'RESERVE',
                           decode(adj.debit_credit_flag,
                           'DR',adj.adjustment_amount,
                           'CR',-adj.adjustment_amount))),0) current_period_reserve
    from   fa_adjustments_mrc_v adj
    where  adj.asset_id = px_rule_in.asset_id
    and    adj.book_type_code = px_rule_in.book_type_code
    and    adj.period_counter_created = px_rule_in.period_counter
    ;
Line: 1194

    select nvl(sum(DECODE(ADJ.ADJUSTMENT_TYPE,
                           'RESERVE',
                          decode(adj.debit_credit_flag,
                           'DR',adj.adjustment_amount,
                           'CR',-adj.adjustment_amount))),0) current_period_reserve
    from   fa_adjustments adj,
           fa_transaction_headers th1,
           fa_transaction_headers th2
    where  adj.asset_id = px_rule_in.asset_id
    and    adj.book_type_code = px_rule_in.book_type_code
    and    adj.period_counter_created = px_rule_in.period_counter
    and    adj.transaction_header_id = th1.transaction_header_id
    and    th1.member_transaction_header_id (+) = th2.transaction_header_id
    and    (th1.transaction_type_code <>'GROUP ADJUSTMENT'
            and th1.trx_reference_id is null)
    and    exists (select th2.asset_id
                   from FA_BOOKS bk
                   where th2.asset_id = bk.asset_id
                   and    bk.book_type_code = px_rule_in.book_type_code
                   and    bk.group_asset_id= px_rule_in.asset_id
                   and    bk.date_ineffective is null);
Line: 1217

    select nvl(sum(DECODE(ADJ.ADJUSTMENT_TYPE,
                           'RESERVE',
                           decode(adj.debit_credit_flag,
                           'DR',adj.adjustment_amount,
                           'CR',-adj.adjustment_amount))),0) current_period_reserve
    from   fa_adjustments_mrc_v adj,
           fa_transaction_headers th1,
           fa_transaction_headers th2
    where  adj.asset_id = px_rule_in.asset_id
    and    adj.book_type_code = px_rule_in.book_type_code
    and    adj.period_counter_created = px_rule_in.period_counter
    and    adj.transaction_header_id = th1.transaction_header_id
    and    th1.member_transaction_header_id (+) = th2.transaction_header_id
    and    (th1.transaction_type_code <>'GROUP ADJUSTMENT'
            and th1.trx_reference_id is null)
    and    exists (select th2.asset_id
                   from   FA_BOOKS_MRC_V bk
                   where th2.asset_id = bk.asset_id
                    and  bk.book_type_code = px_rule_in.book_type_code
                    and  bk.group_asset_id= px_rule_in.asset_id
                    and    bk.date_ineffective is null);
Line: 1241

    select nvl(sum(DECODE(ADJ.ADJUSTMENT_TYPE,
                           'EXPENSE',
                           decode(adj.debit_credit_flag,
                           'DR',adj.adjustment_amount,
                           'CR',-adj.adjustment_amount))),0) current_period_expense
    from   fa_adjustments         adj,
           fa_transaction_headers th,
           fa_deprn_periods       dp
    where  adj.asset_id = px_rule_in.asset_id
    and    adj.book_type_code = px_rule_in.book_type_code
    and    dp.book_type_code = px_rule_in.book_type_code
    and    adj.transaction_header_id = th.transaction_header_id
    and    th.transaction_date_entered
               between dp.calendar_period_open_date and dp.calendar_period_close_date
    and    dp.period_counter = px_rule_in.period_counter
    ;
Line: 1259

    select nvl(sum(DECODE(ADJ.ADJUSTMENT_TYPE,
                           'EXPENSE',
                           decode(adj.debit_credit_flag,
                           'DR',adj.adjustment_amount,
                           'CR',-adj.adjustment_amount))),0) current_period_expense
    from   fa_adjustments_mrc_v         adj,
           fa_transaction_headers       th,
           fa_deprn_periods_mrc_v       dp
    where  adj.asset_id = px_rule_in.asset_id
    and    adj.book_type_code = px_rule_in.book_type_code
    and    dp.book_type_code = px_rule_in.book_type_code
    and    adj.transaction_header_id = th.transaction_header_id
    and    th.transaction_date_entered
               between dp.calendar_period_open_date and dp.calendar_period_close_date
    and    dp.period_counter = px_rule_in.period_counter
    ;
Line: 1499

                         element=>'updated eop_salvage_value',
	 	         value=> px_rule_in.eop_salvage_value,
			 p_log_level_rec => p_log_level_rec);
Line: 1605

    select nvl(sum(RET.EOFY_RESERVE),0)
    from   FA_RETIREMENTS         RET,
           FA_TRANSACTION_HEADERS TH,
           FA_DEPRN_PERIODS       DP,
           FA_FISCAL_YEAR         FY,
           FA_BOOK_CONTROLS       BC
    where  RET.ASSET_ID= px_rule_in.asset_id
    and    RET.BOOK_TYPE_CODE = px_rule_in.book_type_code
    and    DP.BOOK_TYPE_CODE  = px_rule_in.book_type_code
    and    BC.BOOK_TYPE_CODE  = px_rule_in.book_type_code
    and	   RET.TRANSACTION_HEADER_ID_IN = TH.TRANSACTION_HEADER_ID
    and    BC.FISCAL_YEAR_NAME = FY.FISCAL_YEAR_NAME
    and    FY.FISCAL_YEAR = px_rule_in.fiscal_year
    and    DP.PERIOD_COUNTER = px_rule_in.period_counter
    and    TH.TRANSACTION_DATE_ENTERED between
              FY.START_DATE and DP.CALENDAR_PERIOD_CLOSE_DATE
    and	   RET.STATUS in ('PROCESSED','PENDING')
  ;
Line: 1625

    select nvl(sum(RET.EOFY_RESERVE),0)
    from   FA_RETIREMENTS_MRC_V   RET,
           FA_TRANSACTION_HEADERS TH,
           FA_DEPRN_PERIODS_MRC_V DP,
           FA_FISCAL_YEAR         FY,
           FA_BOOK_CONTROLS_MRC_V BC
    where  RET.ASSET_ID= px_rule_in.asset_id
    and    RET.BOOK_TYPE_CODE = px_rule_in.book_type_code
    and    DP.BOOK_TYPE_CODE  = px_rule_in.book_type_code
    and    BC.BOOK_TYPE_CODE  = px_rule_in.book_type_code
    and	   RET.TRANSACTION_HEADER_ID_IN = TH.TRANSACTION_HEADER_ID
    and    BC.FISCAL_YEAR_NAME = FY.FISCAL_YEAR_NAME
    and    FY.FISCAL_YEAR = px_rule_in.fiscal_year
    and    DP.PERIOD_COUNTER = px_rule_in.period_counter
    and    TH.TRANSACTION_DATE_ENTERED between
              FY.START_DATE and DP.CALENDAR_PERIOD_CLOSE_DATE
    and	   RET.STATUS in ('PROCESSED','PENDING')
  ;
Line: 1645

    select nvl(sum(RET.EOFY_RESERVE),0)
    from   FA_RETIREMENTS         RET,
           FA_TRANSACTION_HEADERS TH,
           FA_DEPRN_PERIODS       DP,
           FA_FISCAL_YEAR         FY,
           FA_BOOK_CONTROLS       BC
    where  TH.ASSET_ID= px_rule_in.asset_id
    and    TH.BOOK_TYPE_CODE  = px_rule_in.book_type_code
    and    DP.BOOK_TYPE_CODE  = px_rule_in.book_type_code
    and    BC.BOOK_TYPE_CODE  = px_rule_in.book_type_code
    and	   RET.TRANSACTION_HEADER_ID_IN = TH.MEMBER_TRANSACTION_HEADER_ID (+)
    and    BC.FISCAL_YEAR_NAME = FY.FISCAL_YEAR_NAME
    and    FY.FISCAL_YEAR = px_rule_in.fiscal_year
    and    DP.PERIOD_COUNTER = px_rule_in.period_counter
    and    TH.TRANSACTION_DATE_ENTERED between
              FY.START_DATE and DP.CALENDAR_PERIOD_CLOSE_DATE
    and	   RET.STATUS in ('PROCESSED','PENDING')
    and    exists (select RET.ASSET_ID
                   from FA_BOOKS BK
                   where RET.ASSET_ID = BK.ASSET_ID
                     and BK.BOOK_TYPE_CODE = px_rule_in.book_type_code
                     and    BK.GROUP_ASSET_ID = px_rule_in.asset_id
                     and    BK.DATE_INEFFECTIVE is null)
         ;
Line: 1671

    select nvl(sum(RET.EOFY_RESERVE),0)
    from   FA_RETIREMENTS_MRC_V   RET,
           FA_TRANSACTION_HEADERS TH,
           FA_DEPRN_PERIODS_MRC_V DP,
           FA_FISCAL_YEAR         FY,
           FA_BOOK_CONTROLS_MRC_V BC
    where  TH.ASSET_ID= px_rule_in.asset_id
    and    TH.BOOK_TYPE_CODE  = px_rule_in.book_type_code
    and    DP.BOOK_TYPE_CODE  = px_rule_in.book_type_code
    and    BC.BOOK_TYPE_CODE  = px_rule_in.book_type_code
    and	   RET.TRANSACTION_HEADER_ID_IN = TH.MEMBER_TRANSACTION_HEADER_ID (+)
    and    BC.FISCAL_YEAR_NAME = FY.FISCAL_YEAR_NAME
    and    FY.FISCAL_YEAR = px_rule_in.fiscal_year
    and    DP.PERIOD_COUNTER = px_rule_in.period_counter
    and    TH.TRANSACTION_DATE_ENTERED between
              FY.START_DATE and DP.CALENDAR_PERIOD_CLOSE_DATE
    and	   RET.STATUS in ('PROCESSED','PENDING')
    and    exists (select RET.ASSET_ID
                   from FA_BOOKS_MRC_V BK
                   where RET.ASSET_ID = BK.ASSET_ID
                     and BK.BOOK_TYPE_CODE = px_rule_in.book_type_code
                     and BK.GROUP_ASSET_ID = px_rule_in.asset_id
                     and BK.DATE_INEFFECTIVE is null)
  ;
Line: 1698

    select nvl(sum(RET.EOFY_RESERVE),0)
    from   FA_RETIREMENTS         RET
    where  RET.TRANSACTION_HEADER_ID_IN = px_rule_in.adj_mem_transaction_header_id
    ;
Line: 1704

    select nvl(sum(RET.EOFY_RESERVE),0)
    from   FA_RETIREMENTS_MRC_V   RET
    where  RET.TRANSACTION_HEADER_ID_IN = px_rule_in.adj_mem_transaction_header_id
    ;
Line: 1942

                         element=>'updated eop_salvage_value',
	 	         value=> px_rule_in.eofy_salvage_value,
			 p_log_level_rec => p_log_level_rec);
Line: 2037

  select EXCLUDE_PROCEEDS_FROM_BASIS,
         MEMBER_ROLLUP_FLAG
  from   FA_BOOKS
  where  ASSET_ID = p_asset_id
  and    BOOK_TYPE_CODE = px_rule_in.book_type_code
  and    date_ineffective is null;
Line: 2047

  select EXCLUDE_PROCEEDS_FROM_BASIS,
         MEMBER_ROLLUP_FLAG
  from   FA_BOOKS_MRC_V
  where  ASSET_ID = p_asset_id
  and    BOOK_TYPE_CODE = px_rule_in.book_type_code
  and    date_ineffective is null;
Line: 2057

  select sum(nvl(EOFY_RESERVE,0))
  from   FA_BOOKS
  where  GROUP_ASSET_ID = px_rule_in.asset_id
  and    BOOK_TYPE_CODE = px_rule_in.book_type_code
  and    DATE_INEFFECTIVE is null;
Line: 2066

  select sum(nvl(EOFY_RESERVE,0))
  from   FA_BOOKS_MRC_V
  where  GROUP_ASSET_ID = px_rule_in.asset_id
  and    BOOK_TYPE_CODE = px_rule_in.book_type_code
  and    DATE_INEFFECTIVE is null;
Line: 2699

    select nvl(sum(decode(adj.debit_credit_flag,
                           'DR',adj.adjustment_amount,
                           'CR',-adj.adjustment_amount)),0) beginning_period_expense
    from   fa_adjustments adj
    where  adj.asset_id = px_rule_in.asset_id
    and    adj.book_type_code = px_rule_in.book_type_code
    and    adj.period_counter_created = px_rule_in.period_counter
    and    adj.source_type_code ='DEPRECIATION'
    and    adj.adjustment_type ='EXPENSE';
Line: 2710

    select nvl(sum(decode(adj.debit_credit_flag,
                           'DR',adj.adjustment_amount,
                           'CR',-adj.adjustment_amount)),0) beginning_period_expense
    from   fa_adjustments_mrc_v adj
    where  adj.asset_id = px_rule_in.asset_id
    and    adj.book_type_code = px_rule_in.book_type_code
     and    adj.period_counter_created = px_rule_in.period_counter
    and    adj.source_type_code ='DEPRECIATION'
    and    adj.adjustment_type ='EXPENSE';
Line: 2808

                             element=>'updated eop_salvage_value',
                             value=> px_rule_in.eop_salvage_value,
			     p_log_level_rec => p_log_level_rec);