207:
208: BEGIN
209:
210: if (g_log_level_rec.statement_level) then
211: fa_debug_pkg.add(l_calling_fn,'BEGIN',1
212: ,p_log_level_rec => g_log_level_rec);
213: end if;
214:
215: if p_mrc_sob_type_code = 0 then
220:
221: l_run_date := to_date(p_run_date, 'DD/MM/YYYY HH24:MI:SS');
222:
223: if (g_log_level_rec.statement_level) then
224: fa_debug_pkg.add(l_calling_fn,'l_run_date',p_run_date
225: ,p_log_level_rec => g_log_level_rec);
226: end if;
227:
228: if (l_mrc_sob_type_code = 'R') then
261:
262: end if;
263:
264: if (g_log_level_rec.statement_level) then
265: fa_debug_pkg.add(l_calling_fn,'BEGIN',2
266: ,p_log_level_rec => g_log_level_rec);
267: end if;
268:
269: if (l_mrc_sob_type_code = 'R') then
348:
349: end if;
350:
351: if (g_log_level_rec.statement_level) then
352: fa_debug_pkg.add(l_calling_fn,'BEGIN',3
353: ,p_log_level_rec => g_log_level_rec);
354: end if;
355:
356: l_rows_processed := l_asset_id_tbl.count;
359: end if;
360: for i in 1..l_asset_id_tbl.count loop
361:
362: if (g_log_level_rec.statement_level) then
363: fa_debug_pkg.add(l_calling_fn,'l_asset_id',l_asset_id_tbl(i), g_log_level_rec);
364: fa_debug_pkg.add(l_calling_fn,'l_eofy_flag', l_eofy_flag, g_log_level_rec);
365: end if;
366:
367: l_asset_id := l_asset_id_tbl(i);
360: for i in 1..l_asset_id_tbl.count loop
361:
362: if (g_log_level_rec.statement_level) then
363: fa_debug_pkg.add(l_calling_fn,'l_asset_id',l_asset_id_tbl(i), g_log_level_rec);
364: fa_debug_pkg.add(l_calling_fn,'l_eofy_flag', l_eofy_flag, g_log_level_rec);
365: end if;
366:
367: l_asset_id := l_asset_id_tbl(i);
368:
369: -- Bug4940246: Added following if statement
370: -- Do not call deprn basis rule if it is not eofy and period update is no or
371: -- it is eofy but period update and use eofy are no.
372: if (g_log_level_rec.statement_level) then
373: fa_debug_pkg.add(l_calling_fn,'l_period_update_flag_tbl',
374: l_period_update_flag_tbl(i), g_log_level_rec);
375: fa_debug_pkg.add(l_calling_fn,'l_use_eofy_reserve_flag',
376: l_use_eofy_reserve_flag(i), g_log_level_rec);
377: end if;
371: -- it is eofy but period update and use eofy are no.
372: if (g_log_level_rec.statement_level) then
373: fa_debug_pkg.add(l_calling_fn,'l_period_update_flag_tbl',
374: l_period_update_flag_tbl(i), g_log_level_rec);
375: fa_debug_pkg.add(l_calling_fn,'l_use_eofy_reserve_flag',
376: l_use_eofy_reserve_flag(i), g_log_level_rec);
377: end if;
378:
379: if ((l_eofy_flag = 'N') and
386: l_new_raf_tbl(i) := l_old_raf_tbl(i);
387: l_new_formula_factor_tbl(i):= l_old_formula_factor_tbl(i);
388:
389: if (g_log_level_rec.statement_level) then
390: fa_debug_pkg.add(l_calling_fn,'Not calling deprn basis function',
391: l_new_adjusted_cost_tbl(i), g_log_level_rec);
392: end if;
393:
394: else
437: if l_status <> 0 then
438: raise mass_faxccdb_err;
439: end if;
440: if (g_log_level_rec.statement_level) then
441: fa_debug_pkg.add(l_calling_fn,'after faxccdb',1
442: ,p_log_level_rec => g_log_level_rec);
443: fa_debug_pkg.add(l_calling_fn,'new adj_cost',
444: l_new_adjusted_cost_tbl(i));
445: end if;
439: end if;
440: if (g_log_level_rec.statement_level) then
441: fa_debug_pkg.add(l_calling_fn,'after faxccdb',1
442: ,p_log_level_rec => g_log_level_rec);
443: fa_debug_pkg.add(l_calling_fn,'new adj_cost',
444: l_new_adjusted_cost_tbl(i));
445: end if;
446:
447: end if; -- if ((l_eofy_flag = 'N') and -- Bug4940246
465: -- or deprn_basis_rule is COST or deprn_basis_rule_id doesn't exist
466: --
467:
468: if (g_log_level_rec.statement_level) then
469: fa_debug_pkg.add(l_calling_fn,'BEGIN',5
470: ,p_log_level_rec => g_log_level_rec);
471: end if;
472:
473: if (l_mrc_sob_type_code = 'R') then
571: end if;
572: else
573:
574: if (g_log_level_rec.statement_level) then
575: fa_debug_pkg.add(l_calling_fn,'BEGIN',6
576: ,p_log_level_rec => g_log_level_rec);
577: end if;
578: if (l_eofy_flag = 'Y') then
579:
631:
632: else
633:
634: if (g_log_level_rec.statement_level) then
635: fa_debug_pkg.add(l_calling_fn,'BEGIN',7
636: ,p_log_level_rec => g_log_level_rec);
637: end if;
638:
639: forall i IN 1..l_asset_id_tbl.count
683: -- Bug 6665510: FP: Japan Tax Reform Project (Start)
684: if (l_mrc_sob_type_code <> 'R') then
685:
686: if (g_log_level_rec.statement_level) then
687: fa_debug_pkg.add(l_calling_fn,'++++ eofy_flag', l_eofy_flag, p_log_level_rec => g_log_level_rec);
688: end if;
689:
690: if (l_eofy_flag = 'Y') then
691:
691:
692: for i IN 1..l_asset_id_tbl.count loop
693:
694: if (g_log_level_rec.statement_level) then
695: fa_debug_pkg.add(l_calling_fn,'++++ asset_id', l_asset_id_tbl(i), p_log_level_rec => g_log_level_rec);
696: fa_debug_pkg.add(l_calling_fn,'++++ guarantee_rate_method_flag', l_guarantee_rate_flag_tbl(i)
697: , p_log_level_rec => g_log_level_rec);
698: end if;
699:
692: for i IN 1..l_asset_id_tbl.count loop
693:
694: if (g_log_level_rec.statement_level) then
695: fa_debug_pkg.add(l_calling_fn,'++++ asset_id', l_asset_id_tbl(i), p_log_level_rec => g_log_level_rec);
696: fa_debug_pkg.add(l_calling_fn,'++++ guarantee_rate_method_flag', l_guarantee_rate_flag_tbl(i)
697: , p_log_level_rec => g_log_level_rec);
698: end if;
699:
700: if nvl(l_guarantee_rate_flag_tbl(i),'NO') = 'YES' then
789:
790: x_return_status := 0;
791:
792: if (g_log_level_rec.statement_level) then
793: fa_debug_pkg.add(l_calling_fn,'END',1
794: ,p_log_level_rec => g_log_level_rec);
795: end if;
796:
797: