DBA Data[Home] [Help]

APPS.FA_POLISH_PVT dependencies on FA_POLISH_PVT

Line 1: PACKAGE BODY FA_POLISH_PVT AS

1: PACKAGE BODY FA_POLISH_PVT AS
2: /* $Header: FAVPOLB.pls 120.15 2009/04/15 15:06:30 bridgway ship $ */
3:
4: -- === Overview ============================================================ --
5: --

Line 408: FA_POLISH_PVT.calling_mode := 'DEPRN';

404: l_prev_year_adj_rec_cost := p_Adjusted_Recoverable_Cost;
405:
406: if (p_Calling_Fn = 'fadpdp.faxgpolr') then
407: -- We are calling this from the deprn engine. Set the mode.
408: FA_POLISH_PVT.calling_mode := 'DEPRN';
409: elsif (p_Calling_Fn = 'faproj.faxgpolr') then
410: FA_POLISH_PVT.calling_mode := 'PROJECT';
411: elsif (p_Calling_Fn = 'fa_cde_pkg.whatif.faxgpolr') then
412: FA_POLISH_PVT.calling_mode := 'WHATIF';

Line 410: FA_POLISH_PVT.calling_mode := 'PROJECT';

406: if (p_Calling_Fn = 'fadpdp.faxgpolr') then
407: -- We are calling this from the deprn engine. Set the mode.
408: FA_POLISH_PVT.calling_mode := 'DEPRN';
409: elsif (p_Calling_Fn = 'faproj.faxgpolr') then
410: FA_POLISH_PVT.calling_mode := 'PROJECT';
411: elsif (p_Calling_Fn = 'fa_cde_pkg.whatif.faxgpolr') then
412: FA_POLISH_PVT.calling_mode := 'WHATIF';
413: end if;
414:

Line 412: FA_POLISH_PVT.calling_mode := 'WHATIF';

408: FA_POLISH_PVT.calling_mode := 'DEPRN';
409: elsif (p_Calling_Fn = 'faproj.faxgpolr') then
410: FA_POLISH_PVT.calling_mode := 'PROJECT';
411: elsif (p_Calling_Fn = 'fa_cde_pkg.whatif.faxgpolr') then
412: FA_POLISH_PVT.calling_mode := 'WHATIF';
413: end if;
414:
415: -- Derive current period_counter. Note that this may be different from
416: -- the current open period if we are looping through backdated periods.

Line 507: if (FA_POLISH_PVT.calling_mode = 'ADJUSTMENT') then

503: l_year_of_life := p_Fiscal_Year - l_first_fiscal_year + 1;
504:
505: -- For an adjustment, the p_Adjusted_Cost passed in is not necessarily the
506: -- new cost. We will need to derive this amount.
507: if (FA_POLISH_PVT.calling_mode = 'ADJUSTMENT') then
508:
509: if (p_MRC_SOB_Type_Code = 'R') then
510:
511: select adjusted_cost

Line 529: l_adjusted_cost := FA_POLISH_PVT.adjustment_amount + l_old_adjusted_cost;

525: and asset_id = p_Asset_Id
526: and transaction_header_id_out is null;
527: end if;
528:
529: l_adjusted_cost := FA_POLISH_PVT.adjustment_amount + l_old_adjusted_cost;
530: else
531: l_adjusted_cost := p_Adjusted_Cost;
532: end if;
533:

Line 554: if (FA_POLISH_PVT.calling_mode not in ('DEPRN', 'ADJUSTMENT',

550: return;
551: end if;
552:
553: -- If we are not calling this from a recognized program, then error.
554: if (FA_POLISH_PVT.calling_mode not in ('DEPRN', 'ADJUSTMENT',
555: 'PROJECT', 'WHATIF')) then
556:
557: fa_srvr_msg.add_message(
558: calling_fn => 'fa_polish_pvt.calc_polish_rate_cost',

Line 558: calling_fn => 'fa_polish_pvt.calc_polish_rate_cost',

554: if (FA_POLISH_PVT.calling_mode not in ('DEPRN', 'ADJUSTMENT',
555: 'PROJECT', 'WHATIF')) then
556:
557: fa_srvr_msg.add_message(
558: calling_fn => 'fa_polish_pvt.calc_polish_rate_cost',
559: name => '***FA_POLISH_INVALID_MODE***',
560: p_log_level_rec => p_log_level_rec);
561: raise polish_err;
562: end if;

Line 568: if (FA_POLISH_PVT.calling_mode = 'ADJUSTMENT') then

564: -- =============================================== End Initial Checks === --
565: -- --
566: -- === Check Transactions =============================================== --
567:
568: if (FA_POLISH_PVT.calling_mode = 'ADJUSTMENT') then
569: -- If we are currently doing an adjustment, no rows for the adjustment
570: -- will be been added yet, so there will not exist rows for the
571: -- adjustment in fa_transaction_headers or fa_adjustments.
572: l_transaction_type_code := 'ADJUSTMENT';

Line 616: if (not FA_POLISH_PVT.Calc_Trxn_Values (

612: -- intermediate values since nearly every scenario will require them.
613:
614: if (l_transaction_type_code <> 'NONE') then
615:
616: if (not FA_POLISH_PVT.Calc_Trxn_Values (
617: p_book_type_code => p_book_type_code,
618: p_asset_id => p_asset_id,
619: p_transaction_type_code => l_transaction_type_code,
620: p_transaction_header_id => l_transaction_header_id,

Line 624: p_calling_mode => fa_polish_pvt.calling_mode,

620: p_transaction_header_id => l_transaction_header_id,
621: p_first_period_counter => l_first_period_counter,
622: p_mrc_sob_type_code => p_mrc_sob_type_code,
623: p_set_of_books_id => p_set_of_books_id,
624: p_calling_mode => fa_polish_pvt.calling_mode,
625: x_adjustment_amount => l_adjustment_amount,
626: x_retirement_amount => l_retirement_amount,
627: x_bef_trxn_period_counter => l_bef_trxn_period_counter,
628: x_pos_neg_adjustment => l_pos_neg_adjustment,

Line 700: calling_fn => 'fa_polish_pvt.calc_polish_rate_cost',

696: if (l_prev_year_adjusted_cost is null) or
697: (l_prev_year_adj_rec_cost is null) then
698:
699: fa_srvr_msg.add_message(
700: calling_fn => 'fa_polish_pvt.calc_polish_rate_cost',
701: name => '***FA_POLISH_NULL_COST***',
702: p_log_level_rec => p_log_level_rec);
703: raise polish_err;
704: end if;

Line 817: calling_fn => 'fa_polish_pvt.calc_polish_rate_cost',

813: if (l_prev_year_adjusted_cost is null) or
814: (l_prev_year_adj_rec_cost is null) then
815:
816: fa_srvr_msg.add_message(
817: calling_fn => 'fa_polish_pvt.calc_polish_rate_cost',
818: name => '***FA_POLISH_NULL_COST***',
819: p_log_level_rec => p_log_level_rec);
820: raise polish_err;
821: end if;

Line 953: if (not FA_POLISH_PVT.Calc_Rate (

949: -- === Derive Rate ====================================================== --
950:
951: -- Calculate the rate and switch code for this period.
952:
953: if (not FA_POLISH_PVT.Calc_Rate (
954: p_book_type_code => p_book_type_code,
955: p_asset_id => p_asset_id,
956: p_polish_rule => p_polish_rule,
957: p_year_of_life => l_year_of_life,

Line 1081: calling_fn => 'fa_polish_pvt.Calc_Polish_Rate_Cost', p_log_level_rec => p_log_level_rec);

1077: fa_rx_conc_mesg_pkg.log(sqlerrm);
1078: end if;
1079:
1080: fa_srvr_msg.add_sql_error (
1081: calling_fn => 'fa_polish_pvt.Calc_Polish_Rate_Cost', p_log_level_rec => p_log_level_rec);
1082: x_Rate := 0;
1083: X_Success := 0;
1084:
1085: WHEN OTHERS THEN

Line 1092: calling_fn => 'fa_polish_pvt.Calc_Polish_Rate_Cost', p_log_level_rec => p_log_level_rec);

1088: fa_rx_conc_mesg_pkg.log(sqlerrm);
1089: end if;
1090:
1091: fa_srvr_msg.add_sql_error (
1092: calling_fn => 'fa_polish_pvt.Calc_Polish_Rate_Cost', p_log_level_rec => p_log_level_rec);
1093: x_Rate := 0;
1094: X_Success := 0;
1095:
1096: END Calc_Polish_Rate_Cost;

Line 1132: calling_fn => 'fa_polish_pvt.Calc_Basis_Neg_Adj_Flag_Yes', p_log_level_rec => p_log_level_rec);

1128: fa_rx_conc_mesg_pkg.log(sqlerrm);
1129: end if;
1130:
1131: fa_srvr_msg.add_sql_error (
1132: calling_fn => 'fa_polish_pvt.Calc_Basis_Neg_Adj_Flag_Yes', p_log_level_rec => p_log_level_rec);
1133: return (FALSE);
1134: END Calc_Basis_Neg_Adj_Flag_Yes;
1135:
1136: FUNCTION Calc_Basis_Neg_Adj_Flag_No (

Line 1165: calling_fn => 'fa_polish_pvt.Calc_Basis_Neg_Adj_Flag_No', p_log_level_rec => p_log_level_rec);

1161: fa_rx_conc_mesg_pkg.log(sqlerrm);
1162: end if;
1163:
1164: fa_srvr_msg.add_sql_error (
1165: calling_fn => 'fa_polish_pvt.Calc_Basis_Neg_Adj_Flag_No', p_log_level_rec => p_log_level_rec);
1166: return (FALSE);
1167:
1168: END Calc_Basis_Neg_Adj_Flag_No;
1169:

Line 1199: calling_fn => 'fa_polish_pvt.Calc_Basis_Partial_Ret', p_log_level_rec => p_log_level_rec);

1195: fa_rx_conc_mesg_pkg.log(sqlerrm);
1196: end if;
1197:
1198: fa_srvr_msg.add_sql_error (
1199: calling_fn => 'fa_polish_pvt.Calc_Basis_Partial_Ret', p_log_level_rec => p_log_level_rec);
1200: return (FALSE);
1201:
1202: END Calc_Basis_Partial_Ret;
1203:

Line 1314: calling_fn => 'fa_polish_pvt.Calc_Basis_Trxn', p_log_level_rec => p_log_level_rec);

1310: fa_rx_conc_mesg_pkg.log(sqlerrm);
1311: end if;
1312:
1313: fa_srvr_msg.add_sql_error (
1314: calling_fn => 'fa_polish_pvt.Calc_Basis_Trxn', p_log_level_rec => p_log_level_rec);
1315: return (FALSE);
1316:
1317: WHEN OTHERS THEN
1318:

Line 1324: calling_fn => 'fa_polish_pvt.Calc_Basis_Trxn', p_log_level_rec => p_log_level_rec);

1320: fa_rx_conc_mesg_pkg.log(sqlerrm);
1321: end if;
1322:
1323: fa_srvr_msg.add_sql_error (
1324: calling_fn => 'fa_polish_pvt.Calc_Basis_Trxn', p_log_level_rec => p_log_level_rec);
1325: return (FALSE);
1326: END Calc_Basis_Trxn;
1327:
1328: FUNCTION Calc_Trxn_Values (

Line 1361: l_amortization_start_date := FA_POLISH_PVT.amortization_start_date;

1357: if (p_transaction_type_code = 'ADJUSTMENT') then
1358:
1359: if (p_calling_mode = 'ADJUSTMENT') then
1360:
1361: l_amortization_start_date := FA_POLISH_PVT.amortization_start_date;
1362:
1363: if (p_mrc_sob_type_code = 'R') then
1364:
1365: select period_counter - 1

Line 1386: x_adjustment_amount := FA_POLISH_PVT.adjustment_amount;

1382: if (x_bef_trxn_period_counter < p_first_period_counter) then
1383: x_bef_trxn_period_counter := p_first_period_counter;
1384: end if;
1385:
1386: x_adjustment_amount := FA_POLISH_PVT.adjustment_amount;
1387:
1388: if (x_adjustment_amount > 0) then
1389: -- Positive adjustment
1390: x_pos_neg_adjustment := 'POS';

Line 1555: calling_fn => 'fa_polish_pvt.calc_trxn_values',

1551: if (x_prev_basis is null) or
1552: (x_prev_adj_rec_cost is null) then
1553:
1554: fa_srvr_msg.add_message(
1555: calling_fn => 'fa_polish_pvt.calc_trxn_values',
1556: name => '***FA_POLISH_NULL_COST***',
1557: p_log_level_rec => p_log_level_rec);
1558:
1559: raise polish_err;

Line 1657: calling_fn => 'fa_polish_pvt.calc_trxn_values',

1653: if (x_prev_basis is null) or
1654: (x_prev_adj_rec_cost is null) then
1655:
1656: fa_srvr_msg.add_message(
1657: calling_fn => 'fa_polish_pvt.calc_trxn_values',
1658: name => '***FA_POLISH_NULL_COST***',
1659: p_log_level_rec => p_log_level_rec);
1660:
1661: raise polish_err;

Line 1826: calling_fn => 'fa_polish_pvt.calc_trxn_values',

1822: if (x_prev_basis is null) or
1823: (x_prev_adj_rec_cost is null) then
1824:
1825: fa_srvr_msg.add_message(
1826: calling_fn => 'fa_polish_pvt.calc_trxn_values',
1827: name => '***FA_POLISH_NULL_COST***',
1828: p_log_level_rec => p_log_level_rec);
1829:
1830: raise polish_err;

Line 1914: calling_fn => 'fa_polish_pvt.calc_trxn_values',

1910: if (x_prev_basis is null) or
1911: (x_prev_adj_rec_cost is null) then
1912:
1913: fa_srvr_msg.add_message(
1914: calling_fn => 'fa_polish_pvt.calc_trxn_values',
1915: name => '***FA_POLISH_NULL_COST***',
1916: p_log_level_rec => p_log_level_rec);
1917:
1918: raise polish_err;

Line 1999: calling_fn => 'fa_polish_pvt.Calc_Basis_Trxn', p_log_level_rec => p_log_level_rec);

1995: fa_rx_conc_mesg_pkg.log(sqlerrm);
1996: end if;
1997:
1998: fa_srvr_msg.add_sql_error (
1999: calling_fn => 'fa_polish_pvt.Calc_Basis_Trxn', p_log_level_rec => p_log_level_rec);
2000: return (FALSE);
2001:
2002: WHEN OTHERS THEN
2003:

Line 2009: calling_fn => 'fa_polish_pvt.Calc_Basis_Trxn', p_log_level_rec => p_log_level_rec);

2005: fa_rx_conc_mesg_pkg.log(sqlerrm);
2006: end if;
2007:
2008: fa_srvr_msg.add_sql_error (
2009: calling_fn => 'fa_polish_pvt.Calc_Basis_Trxn', p_log_level_rec => p_log_level_rec);
2010: return (FALSE);
2011: END Calc_Trxn_Values;
2012:
2013: FUNCTION Calc_Rate (

Line 2077: calling_fn => 'fa_polish_pvt.calc_rate',

2073: else
2074: -- Not one of the 5 Polish Mechanisms.
2075:
2076: fa_srvr_msg.add_message(
2077: calling_fn => 'fa_polish_pvt.calc_rate',
2078: name => '***FA_POLISH_INVALID_MECH***',
2079: p_log_level_rec => p_log_level_rec);
2080:
2081: raise calc_rate_err;

Line 2325: calling_fn => 'fa_polish_pvt.calc_rate',

2321: x_adjusted_rate := p_adjusted_rate;
2322: else
2323: -- Unknown switch_code.
2324: fa_srvr_msg.add_message(
2325: calling_fn => 'fa_polish_pvt.calc_rate',
2326: name => '***FA_POLISH_INVALID_SWITCH_CODE***',
2327: p_log_level_rec => p_log_level_rec);
2328:
2329: raise calc_rate_err;

Line 2342: calling_fn => 'fa_polish_pvt.Calc_Rate', p_log_level_rec => p_log_level_rec);

2338: fa_rx_conc_mesg_pkg.log(sqlerrm);
2339: end if;
2340:
2341: fa_srvr_msg.add_sql_error (
2342: calling_fn => 'fa_polish_pvt.Calc_Rate', p_log_level_rec => p_log_level_rec);
2343: return (FALSE);
2344: WHEN OTHERS THEN
2345:
2346: if (sqlcode <> 0) then

Line 2351: calling_fn => 'fa_polish_pvt.Calc_Rate', p_log_level_rec => p_log_level_rec);

2347: fa_rx_conc_mesg_pkg.log(sqlerrm);
2348: end if;
2349:
2350: fa_srvr_msg.add_sql_error (
2351: calling_fn => 'fa_polish_pvt.Calc_Rate', p_log_level_rec => p_log_level_rec);
2352: return (FALSE);
2353: END Calc_Rate;
2354:
2355: END FA_POLISH_PVT;

Line 2355: END FA_POLISH_PVT;

2351: calling_fn => 'fa_polish_pvt.Calc_Rate', p_log_level_rec => p_log_level_rec);
2352: return (FALSE);
2353: END Calc_Rate;
2354:
2355: END FA_POLISH_PVT;