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.11.12010000.1 2008/07/28 13:18:47 appldev ship $ */
3:
4: -- === Overview ============================================================ --
5: --

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

293: l_prev_year_adj_rec_cost := p_Adjusted_Recoverable_Cost;
294:
295: if (p_Calling_Fn = 'fadpdp.faxgpolr') then
296: -- We are calling this from the deprn engine. Set the mode.
297: FA_POLISH_PVT.calling_mode := 'DEPRN';
298: elsif (p_Calling_Fn = 'faproj.faxgpolr') then
299: FA_POLISH_PVT.calling_mode := 'PROJECT';
300: elsif (p_Calling_Fn = 'fa_cde_pkg.whatif.faxgpolr') then
301: FA_POLISH_PVT.calling_mode := 'WHATIF';

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

295: if (p_Calling_Fn = 'fadpdp.faxgpolr') then
296: -- We are calling this from the deprn engine. Set the mode.
297: FA_POLISH_PVT.calling_mode := 'DEPRN';
298: elsif (p_Calling_Fn = 'faproj.faxgpolr') then
299: FA_POLISH_PVT.calling_mode := 'PROJECT';
300: elsif (p_Calling_Fn = 'fa_cde_pkg.whatif.faxgpolr') then
301: FA_POLISH_PVT.calling_mode := 'WHATIF';
302: end if;
303:

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

297: FA_POLISH_PVT.calling_mode := 'DEPRN';
298: elsif (p_Calling_Fn = 'faproj.faxgpolr') then
299: FA_POLISH_PVT.calling_mode := 'PROJECT';
300: elsif (p_Calling_Fn = 'fa_cde_pkg.whatif.faxgpolr') then
301: FA_POLISH_PVT.calling_mode := 'WHATIF';
302: end if;
303:
304: -- Derive current period_counter. Note that this may be different from
305: -- the current open period if we are looping through backdated periods.

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

385: l_year_of_life := p_Fiscal_Year - l_first_fiscal_year + 1;
386:
387: -- For an adjustment, the p_Adjusted_Cost passed in is not necessarily the
388: -- new cost. We will need to derive this amount.
389: if (FA_POLISH_PVT.calling_mode = 'ADJUSTMENT') then
390:
391: if (p_MRC_SOB_Type_Code = 'R') then
392:
393: select adjusted_cost

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

406: and asset_id = p_Asset_Id
407: and transaction_header_id_out is null;
408: end if;
409:
410: l_adjusted_cost := FA_POLISH_PVT.adjustment_amount + l_old_adjusted_cost;
411: else
412: l_adjusted_cost := p_Adjusted_Cost;
413: end if;
414:

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

431: return;
432: end if;
433:
434: -- If we are not calling this from a recognized program, then error.
435: if (FA_POLISH_PVT.calling_mode not in ('DEPRN', 'ADJUSTMENT',
436: 'PROJECT', 'WHATIF')) then
437:
438: fa_srvr_msg.add_message(
439: calling_fn => 'fa_polish_pvt.calc_polish_rate_cost',

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

435: if (FA_POLISH_PVT.calling_mode not in ('DEPRN', 'ADJUSTMENT',
436: 'PROJECT', 'WHATIF')) then
437:
438: fa_srvr_msg.add_message(
439: calling_fn => 'fa_polish_pvt.calc_polish_rate_cost',
440: name => '***FA_POLISH_INVALID_MODE***',
441: p_log_level_rec => p_log_level_rec);
442:
443: raise polish_err;

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

446: -- =============================================== End Initial Checks === --
447: -- --
448: -- === Check Transactions =============================================== --
449:
450: if (FA_POLISH_PVT.calling_mode = 'ADJUSTMENT') then
451: -- If we are currently doing an adjustment, no rows for the adjustment
452: -- will be been added yet, so there will not exist rows for the
453: -- adjustment in fa_transaction_headers or fa_adjustments.
454: l_transaction_type_code := 'ADJUSTMENT';

Line 498: if (not FA_POLISH_PVT.Calc_Trxn_Values (

494: -- intermediate values since nearly every scenario will require them.
495:
496: if (l_transaction_type_code <> 'NONE') then
497:
498: if (not FA_POLISH_PVT.Calc_Trxn_Values (
499: p_book_type_code => p_book_type_code,
500: p_asset_id => p_asset_id,
501: p_transaction_type_code => l_transaction_type_code,
502: p_transaction_header_id => l_transaction_header_id,

Line 505: p_calling_mode => fa_polish_pvt.calling_mode,

501: p_transaction_type_code => l_transaction_type_code,
502: p_transaction_header_id => l_transaction_header_id,
503: p_first_period_counter => l_first_period_counter,
504: p_mrc_sob_type_code => p_mrc_sob_type_code,
505: p_calling_mode => fa_polish_pvt.calling_mode,
506: x_adjustment_amount => l_adjustment_amount,
507: x_retirement_amount => l_retirement_amount,
508: x_bef_trxn_period_counter => l_bef_trxn_period_counter,
509: x_pos_neg_adjustment => l_pos_neg_adjustment,

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

566: if (l_prev_year_adjusted_cost is null) or
567: (l_prev_year_adj_rec_cost is null) then
568:
569: fa_srvr_msg.add_message(
570: calling_fn => 'fa_polish_pvt.calc_polish_rate_cost',
571: name => '***FA_POLISH_NULL_COST***',
572: p_log_level_rec => p_log_level_rec);
573:
574: raise polish_err;

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

668: if (l_prev_year_adjusted_cost is null) or
669: (l_prev_year_adj_rec_cost is null) then
670:
671: fa_srvr_msg.add_message(
672: calling_fn => 'fa_polish_pvt.calc_polish_rate_cost',
673: name => '***FA_POLISH_NULL_COST***',
674: p_log_level_rec => p_log_level_rec);
675:
676: raise polish_err;

Line 807: if (not FA_POLISH_PVT.Calc_Rate (

803: -- --
804: -- === Derive Rate ====================================================== --
805:
806: -- Calculate the rate and switch code for this period.
807: if (not FA_POLISH_PVT.Calc_Rate (
808: p_book_type_code => p_book_type_code,
809: p_asset_id => p_asset_id,
810: p_polish_rule => p_polish_rule,
811: p_year_of_life => l_year_of_life,

Line 931: calling_fn => 'fa_polish_pvt.Calc_Polish_Rate_Cost',

927: fa_rx_conc_mesg_pkg.log(sqlerrm);
928: end if;
929:
930: fa_srvr_msg.add_sql_error (
931: calling_fn => 'fa_polish_pvt.Calc_Polish_Rate_Cost',
932: p_log_level_rec => p_log_level_rec);
933: x_Rate := 0;
934: X_Success := 0;
935:

Line 943: calling_fn => 'fa_polish_pvt.Calc_Polish_Rate_Cost',

939: fa_rx_conc_mesg_pkg.log(sqlerrm);
940: end if;
941:
942: fa_srvr_msg.add_sql_error (
943: calling_fn => 'fa_polish_pvt.Calc_Polish_Rate_Cost',
944: p_log_level_rec => p_log_level_rec);
945:
946: x_Rate := 0;
947: X_Success := 0;

Line 985: calling_fn => 'fa_polish_pvt.Calc_Basis_Neg_Adj_Flag_Yes',

981: fa_rx_conc_mesg_pkg.log(sqlerrm);
982: end if;
983:
984: fa_srvr_msg.add_sql_error (
985: calling_fn => 'fa_polish_pvt.Calc_Basis_Neg_Adj_Flag_Yes',
986: p_log_level_rec => p_log_level_rec);
987: return (FALSE);
988: END Calc_Basis_Neg_Adj_Flag_Yes;
989:

Line 1019: calling_fn => 'fa_polish_pvt.Calc_Basis_Neg_Adj_Flag_No',

1015: fa_rx_conc_mesg_pkg.log(sqlerrm);
1016: end if;
1017:
1018: fa_srvr_msg.add_sql_error (
1019: calling_fn => 'fa_polish_pvt.Calc_Basis_Neg_Adj_Flag_No',
1020: p_log_level_rec => p_log_level_rec);
1021: return (FALSE);
1022:
1023: END Calc_Basis_Neg_Adj_Flag_No;

Line 1054: calling_fn => 'fa_polish_pvt.Calc_Basis_Partial_Ret',

1050: fa_rx_conc_mesg_pkg.log(sqlerrm);
1051: end if;
1052:
1053: fa_srvr_msg.add_sql_error (
1054: calling_fn => 'fa_polish_pvt.Calc_Basis_Partial_Ret',
1055: p_log_level_rec => p_log_level_rec);
1056: return (FALSE);
1057:
1058: END Calc_Basis_Partial_Ret;

Line 1167: calling_fn => 'fa_polish_pvt.Calc_Basis_Trxn',

1163: fa_rx_conc_mesg_pkg.log(sqlerrm);
1164: end if;
1165:
1166: fa_srvr_msg.add_sql_error (
1167: calling_fn => 'fa_polish_pvt.Calc_Basis_Trxn',
1168: p_log_level_rec => p_log_level_rec);
1169: return (FALSE);
1170:
1171: WHEN OTHERS THEN

Line 1178: calling_fn => 'fa_polish_pvt.Calc_Basis_Trxn',

1174: fa_rx_conc_mesg_pkg.log(sqlerrm);
1175: end if;
1176:
1177: fa_srvr_msg.add_sql_error (
1178: calling_fn => 'fa_polish_pvt.Calc_Basis_Trxn',
1179: p_log_level_rec => p_log_level_rec);
1180: return (FALSE);
1181: END Calc_Basis_Trxn;
1182:

Line 1216: l_amortization_start_date := FA_POLISH_PVT.amortization_start_date;

1212: if (p_transaction_type_code = 'ADJUSTMENT') then
1213:
1214: if (p_calling_mode = 'ADJUSTMENT') then
1215:
1216: l_amortization_start_date := FA_POLISH_PVT.amortization_start_date;
1217:
1218: if (p_mrc_sob_type_code = 'R') then
1219:
1220: select period_counter - 1

Line 1240: x_adjustment_amount := FA_POLISH_PVT.adjustment_amount;

1236: if (x_bef_trxn_period_counter < p_first_period_counter) then
1237: x_bef_trxn_period_counter := p_first_period_counter;
1238: end if;
1239:
1240: x_adjustment_amount := FA_POLISH_PVT.adjustment_amount;
1241:
1242: if (x_adjustment_amount > 0) then
1243: -- Positive adjustment
1244: x_pos_neg_adjustment := 'POS';

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

1394: if (x_prev_basis is null) or
1395: (x_prev_adj_rec_cost is null) then
1396:
1397: fa_srvr_msg.add_message(
1398: calling_fn => 'fa_polish_pvt.calc_trxn_values',
1399: name => '***FA_POLISH_NULL_COST***',
1400: p_log_level_rec => p_log_level_rec);
1401:
1402: raise polish_err;

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

1482: if (x_prev_basis is null) or
1483: (x_prev_adj_rec_cost is null) then
1484:
1485: fa_srvr_msg.add_message(
1486: calling_fn => 'fa_polish_pvt.calc_trxn_values',
1487: name => '***FA_POLISH_NULL_COST***',
1488: p_log_level_rec => p_log_level_rec);
1489:
1490: raise polish_err;

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

1642: if (x_prev_basis is null) or
1643: (x_prev_adj_rec_cost is null) then
1644:
1645: fa_srvr_msg.add_message(
1646: calling_fn => 'fa_polish_pvt.calc_trxn_values',
1647: name => '***FA_POLISH_NULL_COST***',
1648: p_log_level_rec => p_log_level_rec);
1649:
1650: raise polish_err;

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

1724: if (x_prev_basis is null) or
1725: (x_prev_adj_rec_cost is null) then
1726:
1727: fa_srvr_msg.add_message(
1728: calling_fn => 'fa_polish_pvt.calc_trxn_values',
1729: name => '***FA_POLISH_NULL_COST***',
1730: p_log_level_rec => p_log_level_rec);
1731:
1732: raise polish_err;

Line 1813: calling_fn => 'fa_polish_pvt.Calc_Basis_Trxn',

1809: fa_rx_conc_mesg_pkg.log(sqlerrm);
1810: end if;
1811:
1812: fa_srvr_msg.add_sql_error (
1813: calling_fn => 'fa_polish_pvt.Calc_Basis_Trxn',
1814: p_log_level_rec => p_log_level_rec);
1815: return (FALSE);
1816:
1817: WHEN OTHERS THEN

Line 1824: calling_fn => 'fa_polish_pvt.Calc_Basis_Trxn',

1820: fa_rx_conc_mesg_pkg.log(sqlerrm);
1821: end if;
1822:
1823: fa_srvr_msg.add_sql_error (
1824: calling_fn => 'fa_polish_pvt.Calc_Basis_Trxn',
1825: p_log_level_rec => p_log_level_rec);
1826: return (FALSE);
1827: END Calc_Trxn_Values;
1828:

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

1889: else
1890: -- Not one of the 5 Polish Mechanisms.
1891:
1892: fa_srvr_msg.add_message(
1893: calling_fn => 'fa_polish_pvt.calc_rate',
1894: name => '***FA_POLISH_INVALID_MECH***',
1895: p_log_level_rec => p_log_level_rec);
1896:
1897: raise calc_rate_err;

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

2135: x_adjusted_rate := p_adjusted_rate;
2136: else
2137: -- Unknown switch_code.
2138: fa_srvr_msg.add_message(
2139: calling_fn => 'fa_polish_pvt.calc_rate',
2140: name => '***FA_POLISH_INVALID_SWITCH_CODE***',
2141: p_log_level_rec => p_log_level_rec);
2142:
2143: raise calc_rate_err;

Line 2156: calling_fn => 'fa_polish_pvt.Calc_Rate',

2152: fa_rx_conc_mesg_pkg.log(sqlerrm);
2153: end if;
2154:
2155: fa_srvr_msg.add_sql_error (
2156: calling_fn => 'fa_polish_pvt.Calc_Rate',
2157: p_log_level_rec => p_log_level_rec);
2158: return (FALSE);
2159: WHEN OTHERS THEN
2160:

Line 2166: calling_fn => 'fa_polish_pvt.Calc_Rate',

2162: fa_rx_conc_mesg_pkg.log(sqlerrm);
2163: end if;
2164:
2165: fa_srvr_msg.add_sql_error (
2166: calling_fn => 'fa_polish_pvt.Calc_Rate',
2167: p_log_level_rec => p_log_level_rec);
2168: return (FALSE);
2169: END Calc_Rate;
2170:

Line 2171: END FA_POLISH_PVT;

2167: p_log_level_rec => p_log_level_rec);
2168: return (FALSE);
2169: END Calc_Rate;
2170:
2171: END FA_POLISH_PVT;