DBA Data[Home] [Help]

APPS.FA_SHORT_TAX_YEARS_PKG SQL Statements

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

Line: 64

           select cp.start_date trx_date
           from   fa_transaction_headers th
                , fa_calendar_periods cp
           where  th.asset_id = X_Asset_Id
           and    th.book_type_code = X_Book_Type_Code
           and    cp.calendar_type = h_calendar_type
           and    nvl(th.amortization_start_date, th.transaction_date_entered)
                        between cp.start_date and cp.end_date
           and    th.transaction_subtype = 'AMORTIZED'
           and    nvl(th.amortization_start_date, th.transaction_date_entered)
                        between h_curr_fy_start_date and l_period_rec.calendar_period_close_date
           order by trx_date desc; --14786773 Added desc as need to select latest transaction.
Line: 78

    SELECT decode(X_Short_Fiscal_Year_Flag,
                  'YES',decode(fy.fiscal_year - bc.current_fiscal_year,
                            0, greatest(h_conversion_date, h_deprn_start_date),
                            h_conversion_date),
                  h_conversion_date),
	   decode(fy.fiscal_year - bc.current_fiscal_year,
		  0, h_deprn_start_date,
		  decode(h_curr_fy_start_date,
			 NULL,to_date(C_Curr_Fy_Start_Date, 'DD/MM/YYYY'),
			 h_curr_fy_start_date))
    FROM  fa_fiscal_year fy,
          fa_book_controls bc
    WHERE  h_dpis between fy.start_date
                                    and fy.end_date
    AND   bc.book_type_code = X_Book_Type_Code
    AND   bc.fiscal_year_name = fy.fiscal_year_name;
Line: 96

      select cp.start_date
      from fa_calendar_periods cp,
	   fa_fiscal_year fy
      where cp.calendar_type = h_calendar_type
      and   cp.period_num = X_Current_Period
      and   cp.start_date >= fy.start_date
      and   cp.end_date <= fy.end_date
      and   fy.fiscal_year_name = h_fy_name
      and   fy.fiscal_year = X_Fiscal_Year;