25:
26: begin
27:
28: x_last_period := FALSE;
29: l_cur_pdctr := fa_cache_pkg.fazcdp_record.period_counter;
30:
31: l_fy_name := fa_cache_pkg.fazcbc_record.fiscal_year_name;
32: if not fa_cache_pkg.fazccp (p_cal, l_fy_name,
33: dpr.prorate_jdate, l_prorate, l_y_dp_begin, dummynum) then
27:
28: x_last_period := FALSE;
29: l_cur_pdctr := fa_cache_pkg.fazcdp_record.period_counter;
30:
31: l_fy_name := fa_cache_pkg.fazcbc_record.fiscal_year_name;
32: if not fa_cache_pkg.fazccp (p_cal, l_fy_name,
33: dpr.prorate_jdate, l_prorate, l_y_dp_begin, dummynum) then
34: return (FALSE);
35: end if;
28: x_last_period := FALSE;
29: l_cur_pdctr := fa_cache_pkg.fazcdp_record.period_counter;
30:
31: l_fy_name := fa_cache_pkg.fazcbc_record.fiscal_year_name;
32: if not fa_cache_pkg.fazccp (p_cal, l_fy_name,
33: dpr.prorate_jdate, l_prorate, l_y_dp_begin, dummynum) then
34: return (FALSE);
35: end if;
36:
33: dpr.prorate_jdate, l_prorate, l_y_dp_begin, dummynum) then
34: return (FALSE);
35: end if;
36:
37: if not fa_cache_pkg.fazcct (d_cal) then
38: return (FALSE);
39: end if;
40: l_pers_per_yr := fa_cache_pkg.fazcct_record.NUMBER_PER_FISCAL_YEAR;
41:
36:
37: if not fa_cache_pkg.fazcct (d_cal) then
38: return (FALSE);
39: end if;
40: l_pers_per_yr := fa_cache_pkg.fazcct_record.NUMBER_PER_FISCAL_YEAR;
41:
42: if not fa_cache_pkg.fazcct (p_cal) then
43: return (FALSE);
44: end if;
38: return (FALSE);
39: end if;
40: l_pers_per_yr := fa_cache_pkg.fazcct_record.NUMBER_PER_FISCAL_YEAR;
41:
42: if not fa_cache_pkg.fazcct (p_cal) then
43: return (FALSE);
44: end if;
45: l_rate_pers_per_yr := fa_cache_pkg.fazcct_record.NUMBER_PER_FISCAL_YEAR;
46:
41:
42: if not fa_cache_pkg.fazcct (p_cal) then
43: return (FALSE);
44: end if;
45: l_rate_pers_per_yr := fa_cache_pkg.fazcct_record.NUMBER_PER_FISCAL_YEAR;
46:
47: l_lst_per := l_prorate - 2 +
48: mod(floor(dpr.life * l_rate_pers_per_yr/12),l_rate_pers_per_yr) +1 ;
49:
191: dpr.p_cl_end := v_end;
192:
193: --Bug6679173
194: --Added the following code
195: if not fa_cache_pkg.fazcct (d_cal) then
196: return (FALSE);
197: end if;
198:
199: IF retirement_id is null then
309: close c_get_trxn_id;
310: end if;
311: --Bug6679173 ends
312:
313: if not fa_cache_pkg.fazccmt
314: (X_method => dpr.method_code,
315: X_life => dpr.life
316: ) then
317: raise fagcdp_err;
316: ) then
317: raise fagcdp_err;
318: end if;
319:
320: if (fa_cache_pkg.fazccmt_record.rate_source_rule = 'CALCULATED') then
321: if not fagcrsv(dpr => dpr,
322: d_cal => d_cal,
323: p_cal => p_cal,
324: x_last_period => l_last_period) then
328: -- Bug fix 6003600 (Added code to determine whether retirement is performed in last period
329: -- of asset's life as per prorate calendar or not and accordingly calculated deprn_amt for daily prorate calendar)
330: if l_last_period then
331:
332: if not fa_cache_pkg.fazcct (p_cal) then
333: return (FALSE);
334: end if;
335:
336: l_pers_per_yr := fa_cache_pkg.fazcct_record.NUMBER_PER_FISCAL_YEAR;
332: if not fa_cache_pkg.fazcct (p_cal) then
333: return (FALSE);
334: end if;
335:
336: l_pers_per_yr := fa_cache_pkg.fazcct_record.NUMBER_PER_FISCAL_YEAR;
337:
338: fa_debug_pkg.add ('FAGDCP', 'l_pers_per_yr', l_pers_per_yr);
339:
340: if l_pers_per_yr <> 365 then
516: BEGIN
517:
518: l_asset_hdr_rec.asset_id := ret.asset_id;
519: l_asset_hdr_rec.book_type_code := ret.book;
520: l_asset_hdr_rec.set_of_books_id := fa_cache_pkg.fazcbc_record.set_of_books_id;
521: l_mrc_sob_type_code := ret.mrc_sob_type_code;
522:
523: OPEN c_get_rein_thid;
524: FETCH c_get_rein_thid INTO l_trans_rec.transaction_header_id;