DBA Data[Home] [Help]

APPS.FA_ADJUSTMENT_PUB dependencies on FA_CACHE_PKG

Line 11: g_release number := fa_cache_pkg.fazarel_release;

7: G_API_NAME CONSTANT varchar2(30) := 'Adjustment API';
8: G_API_VERSION CONSTANT number := 1.0;
9:
10: g_log_level_rec fa_api_types.log_level_rec_type;
11: g_release number := fa_cache_pkg.fazarel_release;
12:
13: --*********************** Private functions ******************************--
14:
15: -- private declaration for books (mrc) wrapper

Line 84: l_tax_book_tbl FA_CACHE_PKG.fazctbk_tbl_type;

80:
81: -- used for tax books when doing cip-in-tax or autocopy
82: l_trans_rec FA_API_TYPES.trans_rec_type;
83: l_asset_hdr_rec FA_API_TYPES.asset_hdr_rec_type;
84: l_tax_book_tbl FA_CACHE_PKG.fazctbk_tbl_type;
85: l_tax_index NUMBER; -- index for tax loop
86: l_inv_trans_rec FA_API_TYPES.inv_trans_rec_type; /* Added for Bug 12380342 */
87:
88: -- Bug:5930979:Japan Tax Reform Project

Line 109: g_release := fa_cache_pkg.fazarel_release;

105: raise adj_err;
106: end if;
107: end if;
108:
109: g_release := fa_cache_pkg.fazarel_release;
110:
111: g_cip_cost := 0;
112: -- Initialize message list if p_init_msg_list is set to TRUE.
113: if (fnd_api.to_boolean(p_init_msg_list)) then

Line 190: if NOT fa_cache_pkg.fazcbc(X_book => px_asset_hdr_rec.book_type_code, p_log_level_rec => g_log_level_rec) then

186: end if;
187: /*bug#16426081 */
188:
189: -- call the cache for the primary transaction book
190: if NOT fa_cache_pkg.fazcbc(X_book => px_asset_hdr_rec.book_type_code, p_log_level_rec => g_log_level_rec) then
191: raise adj_err;
192: end if;
193:
194: px_asset_hdr_rec.set_of_books_id := fa_cache_pkg.fazcbc_record.set_of_books_id;

Line 194: px_asset_hdr_rec.set_of_books_id := fa_cache_pkg.fazcbc_record.set_of_books_id;

190: if NOT fa_cache_pkg.fazcbc(X_book => px_asset_hdr_rec.book_type_code, p_log_level_rec => g_log_level_rec) then
191: raise adj_err;
192: end if;
193:
194: px_asset_hdr_rec.set_of_books_id := fa_cache_pkg.fazcbc_record.set_of_books_id;
195:
196: -- verify the asset exist in the book already
197: if not FA_ASSET_VAL_PVT.validate_asset_book
198: (p_transaction_type_code => 'ADJUSTMENT',

Line 211: if not fa_cache_pkg.fazcsob

207: -- that is not tied to a SOB_ID by getting the value from
208: -- the book struct
209:
210: -- Get the book type code P,R or N
211: if not fa_cache_pkg.fazcsob
212: (X_set_of_books_id => px_asset_hdr_rec.set_of_books_id,
213: X_mrc_sob_type_code => l_reporting_flag
214: , p_log_level_rec => g_log_level_rec) then
215: raise adj_err;

Line 294: if not fa_cache_pkg.fazccmt (

290: where book_type_code = px_asset_hdr_rec.book_type_code
291: and asset_id = px_asset_hdr_rec.asset_id
292: and transaction_header_id_out is null;
293:
294: if not fa_cache_pkg.fazccmt (
295: X_method => l_deprn_method_code,
296: X_life => l_life_in_months, p_log_level_rec => g_log_level_rec) then
297: raise adj_err;
298: end if;

Line 301: if (nvl(fa_cache_pkg.fazccmt_record.guarantee_rate_method_flag,'NO') = 'YES') and

297: raise adj_err;
298: end if;
299:
300:
301: if (nvl(fa_cache_pkg.fazccmt_record.guarantee_rate_method_flag,'NO') = 'YES') and
302: nvl(l_asset_fin_rec_adj.group_asset_id,
303: FND_API.G_MISS_NUM) <> FND_API.G_MISS_NUM then
304: fa_srvr_msg.add_message
305: (calling_fn => l_calling_fn,

Line 314: if (fa_cache_pkg.fazcbc_record.book_class = 'TAX' and

310: */
311: -- do not allow manual cost changes on cip assets in tax
312: -- except when api is called from the cip-in-tax gateway
313:
314: if (fa_cache_pkg.fazcbc_record.book_class = 'TAX' and
315: l_asset_type_rec.asset_type = 'CIP' and
316: p_calling_fn NOT IN ('fa_ciptax_api_pkg.cip_adj','FA_RECLASS_PVT.do_redefault'))
317: then
318: fa_srvr_msg.add_message

Line 412: if (fa_cache_pkg.fazcbc_record.book_class = 'CORPORATE') then

408: end if;
409:
410: -- If book is a corporate book, process cip assets and autocopy
411:
412: if (fa_cache_pkg.fazcbc_record.book_class = 'CORPORATE') then
413:
414: -- BUG# 2792134
415: -- null out the fin_rec table as well as deprn
416: -- cost and mrc cost will be rederived using corp values

Line 439: if not fa_cache_pkg.fazctbk

435: l_trans_rec := px_trans_rec;
436: l_asset_hdr_rec := px_asset_hdr_rec;
437: l_inv_trans_rec := null; /* Added for Bug 12380342 */
438:
439: if not fa_cache_pkg.fazctbk
440: (x_corp_book => px_asset_hdr_rec.book_type_code,
441: x_asset_type => l_asset_type_rec.asset_type,
442: x_tax_book_tbl => l_tax_book_tbl, p_log_level_rec => g_log_level_rec) then
443: raise adj_err;

Line 461: if (NOT fa_cache_pkg.fazcbc(X_book => l_tax_book_tbl(l_tax_index),

457: null;
458: else
459:
460: -- cache the book information for the tax book
461: if (NOT fa_cache_pkg.fazcbc(X_book => l_tax_book_tbl(l_tax_index),
462: p_log_level_rec => g_log_level_rec)) then
463: raise adj_err;
464: end if;
465:

Line 471: l_asset_hdr_rec.set_of_books_id := fa_cache_pkg.fazcbc_record.set_of_books_id;

467: -- May need to set the transaction date, trx_type, subtype here as well
468: -- based on the open period and settings for each tax book in the loop
469:
470: l_asset_hdr_rec.book_type_code := l_tax_book_tbl(l_tax_index);
471: l_asset_hdr_rec.set_of_books_id := fa_cache_pkg.fazcbc_record.set_of_books_id;
472: l_trans_rec.source_transaction_header_id := px_trans_rec.transaction_header_id;
473: l_trans_rec.transaction_header_id := null;
474: /* Added for Bug 12380342 Start */
475: l_trans_rec.trx_reference_id := null;

Line 610: l_sob_tbl FA_CACHE_PKG.fazcrsob_sob_tbl_type;

606:
607: l_reporting_flag varchar2(1);
608:
609: l_period_rec FA_API_TYPES.period_rec_type;
610: l_sob_tbl FA_CACHE_PKG.fazcrsob_sob_tbl_type;
611:
612: -- used for local runs
613: l_responsibility_id number;
614: l_application_id number;

Line 922: p_db_rule_name => fa_cache_pkg.fazcdrd_record.rule_name,

918: p_date_placed_in_service => l_asset_fin_rec_adj.date_placed_in_service,
919: p_conversion_date => l_asset_fin_rec_adj.date_placed_in_service,
920: p_period_rec => l_period_rec,
921: p_amortization_start_date => px_trans_rec.amortization_start_date,
922: p_db_rule_name => fa_cache_pkg.fazcdrd_record.rule_name,
923: p_rate_source_rule => fa_cache_pkg.fazccmt_record.rate_source_rule,
924: p_transaction_key => px_trans_rec.transaction_key,
925: x_amortization_start_date => l_amortization_start_date,
926: x_trxs_exist => l_trxs_exist,

Line 923: p_rate_source_rule => fa_cache_pkg.fazccmt_record.rate_source_rule,

919: p_conversion_date => l_asset_fin_rec_adj.date_placed_in_service,
920: p_period_rec => l_period_rec,
921: p_amortization_start_date => px_trans_rec.amortization_start_date,
922: p_db_rule_name => fa_cache_pkg.fazcdrd_record.rule_name,
923: p_rate_source_rule => fa_cache_pkg.fazccmt_record.rate_source_rule,
924: p_transaction_key => px_trans_rec.transaction_key,
925: x_amortization_start_date => l_amortization_start_date,
926: x_trxs_exist => l_trxs_exist,
927: p_calling_fn => l_calling_fn, p_log_level_rec => p_log_level_rec) then

Line 945: if not FA_CACHE_PKG.fazcrsob

941: end if;
942:
943:
944: -- call the sob cache to get the table of sob_ids
945: if not FA_CACHE_PKG.fazcrsob
946: (x_book_type_code => px_asset_hdr_rec.book_type_code,
947: x_sob_tbl => l_sob_tbl, p_log_level_rec => p_log_level_rec) then
948: raise adj_err;
949: end if;

Line 967: if NOT fa_cache_pkg.fazcbcs(X_book => px_asset_hdr_rec.book_type_code,

963: end if;
964:
965: -- call the cache to set the sob_id used for rounding and other lower
966: -- level code for each book.
967: if NOT fa_cache_pkg.fazcbcs(X_book => px_asset_hdr_rec.book_type_code,
968: X_set_of_books_id => l_asset_hdr_rec.set_of_books_id,
969: p_log_level_rec => p_log_level_rec) then
970: raise adj_err;
971: end if;

Line 997: if not fa_cache_pkg.fazccmt (

993: end if;
994:
995: --New validation added for 10328635
996:
997: if not fa_cache_pkg.fazccmt (
998: X_method => nvl(l_asset_fin_rec_adj.deprn_method_code,l_asset_fin_rec_old.deprn_method_code),/*bug#15897249 */
999: X_life => l_life_in_months, p_log_level_rec => p_log_level_rec) then
1000: raise adj_err;
1001: end if;

Line 1004: if (nvl(fa_cache_pkg.fazccmt_record.guarantee_rate_method_flag,'NO') = 'YES') and

1000: raise adj_err;
1001: end if;
1002:
1003:
1004: if (nvl(fa_cache_pkg.fazccmt_record.guarantee_rate_method_flag,'NO') = 'YES') and
1005: nvl(l_asset_fin_rec_adj.group_asset_id, FND_API.G_MISS_NUM) <> FND_API.G_MISS_NUM then
1006: fa_srvr_msg.add_message
1007: (calling_fn => l_calling_fn,
1008: name => 'FA_GROUP_NOT_AVAILABLE', p_log_level_rec => p_log_level_rec);

Line 1045: if (fa_cache_pkg.fazcbc_record.book_class = 'CORPORATE' and

1041: end if;
1042:
1043: -- do not allow manual cost changes on cip assets in corp
1044: -- cost adjustments must be done via invoices
1045: if (fa_cache_pkg.fazcbc_record.book_class = 'CORPORATE' and
1046: p_asset_type_rec.asset_type = 'CIP' and
1047: nvl(l_asset_fin_rec_adj.cost, 0) <> 0) then
1048: fa_srvr_msg.add_message
1049: (calling_fn => l_calling_fn,

Line 1194: if( fa_cache_pkg.fazccmt_record.rate_source_rule = 'PRODUCTION'

1190: -- any provided value
1191: -- Bug# 7613544 to default amortization start date for energy if not provided.
1192:
1193: --Bug# 7715678 to default amortization start date for energy if not provided.
1194: if( fa_cache_pkg.fazccmt_record.rate_source_rule = 'PRODUCTION'
1195: AND fa_cache_pkg.fazcdrd_record.rule_name = 'ENERGY PERIOD END BALANCE') then
1196: open c_get_context_date(px_asset_hdr_rec.book_type_code);
1197: fetch c_get_context_date into l_trx_date ;
1198: close c_get_context_date;

Line 1195: AND fa_cache_pkg.fazcdrd_record.rule_name = 'ENERGY PERIOD END BALANCE') then

1191: -- Bug# 7613544 to default amortization start date for energy if not provided.
1192:
1193: --Bug# 7715678 to default amortization start date for energy if not provided.
1194: if( fa_cache_pkg.fazccmt_record.rate_source_rule = 'PRODUCTION'
1195: AND fa_cache_pkg.fazcdrd_record.rule_name = 'ENERGY PERIOD END BALANCE') then
1196: open c_get_context_date(px_asset_hdr_rec.book_type_code);
1197: fetch c_get_context_date into l_trx_date ;
1198: close c_get_context_date;
1199: px_trans_rec.amortization_start_date := px_trans_rec.transaction_date_entered;

Line 1233: if( fa_cache_pkg.fazccmt_record.deprn_basis_rule = 'NBV'

1229: end if;
1230:
1231: end if;
1232: /*bug#15897249 starts*/
1233: if( fa_cache_pkg.fazccmt_record.deprn_basis_rule = 'NBV'
1234: AND fa_cache_pkg.fazcdrd_record.rule_name = 'YEAR END BALANCE WITH POSITIVE REDUCTION AMOUNT'
1235: AND p_asset_type_rec.asset_type = 'GROUP'
1236: AND nvl(l_asset_fin_rec_adj.tracking_method,l_asset_fin_rec_old.tracking_method) = 'CALCULATE'
1237: AND nvl(l_asset_fin_rec_adj.member_rollup_flag,l_asset_fin_rec_old.member_rollup_flag) = 'Y'

Line 1234: AND fa_cache_pkg.fazcdrd_record.rule_name = 'YEAR END BALANCE WITH POSITIVE REDUCTION AMOUNT'

1230:
1231: end if;
1232: /*bug#15897249 starts*/
1233: if( fa_cache_pkg.fazccmt_record.deprn_basis_rule = 'NBV'
1234: AND fa_cache_pkg.fazcdrd_record.rule_name = 'YEAR END BALANCE WITH POSITIVE REDUCTION AMOUNT'
1235: AND p_asset_type_rec.asset_type = 'GROUP'
1236: AND nvl(l_asset_fin_rec_adj.tracking_method,l_asset_fin_rec_old.tracking_method) = 'CALCULATE'
1237: AND nvl(l_asset_fin_rec_adj.member_rollup_flag,l_asset_fin_rec_old.member_rollup_flag) = 'Y'
1238: AND nvl(l_asset_fin_rec_adj.exclude_proceeds_from_basis,l_asset_fin_rec_old.exclude_proceeds_from_basis) is null

Line 1260: if (fa_cache_pkg.fazcbc_record.book_class = 'CORPORATE') then

1256: -- for the delta cost, etc. invoice engine will alter the gl sob
1257: -- and currency context from the above setting as it processes primary
1258: -- and reporting, but will reset them at temrination back to primary.
1259:
1260: if (fa_cache_pkg.fazcbc_record.book_class = 'CORPORATE') then
1261:
1262: if (px_inv_trans_rec.transaction_type is not null) then
1263:
1264: l_asset_fin_rec_adj_init := p_asset_fin_rec_adj;

Line 1310: elsif (nvl(fa_cache_pkg.fazcbc_record.allow_cip_dep_group_flag, 'N') = 'Y') then

1306: end if; -- corp
1307:
1308: if (p_asset_type_rec.asset_type <> 'CIP') then
1309: l_asset_fin_rec_adj.cip_cost := 0;
1310: elsif (nvl(fa_cache_pkg.fazcbc_record.allow_cip_dep_group_flag, 'N') = 'Y') then
1311: l_asset_fin_rec_adj.cip_cost := g_cip_cost;
1312: else
1313: l_asset_fin_rec_adj.cip_cost := l_asset_fin_rec_adj.cost;
1314: end if;

Line 1457: adj_row.account := fa_cache_pkg.fazccb_record.DEPRN_EXPENSE_ACCT;

1453: -- Added the below code to reverse the DEPRN EXPENSE
1454: -- when reserve is manually adjusted in period of addition
1455: -- bug 4439919
1456:
1457: adj_row.account := fa_cache_pkg.fazccb_record.DEPRN_EXPENSE_ACCT;
1458: adj_row.account_type := 'DEPRN_EXPENSE_ACCT';
1459: adj_row.gen_ccid_flag := TRUE;
1460: adj_row.debit_credit_flag := 'CR';
1461: adj_row.selection_mode := fa_std_types.FA_AJ_ACTIVE;

Line 1576: fa_cache_pkg.fazcbc_record.book_class = 'TAX') then

1572: -- was involved, the amounts were already calculated and populated in the mrc
1573: -- pl/sql tables and we just need to copy them into the local variables.
1574:
1575: if (px_inv_trans_rec.transaction_type is null or
1576: fa_cache_pkg.fazcbc_record.book_class = 'TAX') then
1577:
1578: -- Get the associated rate for the adjustment when the invoice table is
1579: -- not populated. If this is a transaction being copied form corp to tax
1580: -- (masscp, cip-in-tax, autocopy), then we will always get the rate for

Line 1584: (fa_cache_pkg.fazcbc_record.book_class = 'TAX')) then

1580: -- (masscp, cip-in-tax, autocopy), then we will always get the rate for
1581: -- the corp trx and use that - unless the corp is not mrc enabled
1582:
1583: if ((px_trans_rec.source_transaction_header_id is not null) and
1584: (fa_cache_pkg.fazcbc_record.book_class = 'TAX')) then
1585:
1586: --Take back up of avg_rate
1587: l_avg_rate_bk := l_avg_rate;
1588: -- get the exchange rate from the corporate transaction

Line 1602: (p_prim_set_of_books_id => fa_cache_pkg.fazcbc_record.set_of_books_id,

1598: -- get the current average rate for the adjustment
1599: l_exchange_date := px_trans_rec.transaction_date_entered;
1600:
1601: if not FA_MC_UTIL_PVT.get_trx_rate
1602: (p_prim_set_of_books_id => fa_cache_pkg.fazcbc_record.set_of_books_id,
1603: p_reporting_set_of_books_id => l_sob_tbl(l_sob_index),
1604: px_exchange_date => l_exchange_date,
1605: p_book_type_code => px_asset_hdr_rec.book_type_code,
1606: px_rate => l_rate,

Line 1620: (p_prim_set_of_books_id => fa_cache_pkg.fazcbc_record.set_of_books_id,

1616: -- get the current average rate for the addition
1617: l_exchange_date := px_trans_rec.transaction_date_entered;
1618:
1619: if not FA_MC_UTIL_PVT.get_trx_rate
1620: (p_prim_set_of_books_id => fa_cache_pkg.fazcbc_record.set_of_books_id,
1621: p_reporting_set_of_books_id => l_sob_tbl(l_sob_index),
1622: px_exchange_date => l_exchange_date,
1623: p_book_type_code => px_asset_hdr_rec.book_type_code,
1624: px_rate => l_rate,

Line 2000: (fa_cache_pkg.fazccmt (

1996: -- First find out if we have a polish mechanism here
1997: if (p_asset_type_rec.asset_type <> 'GROUP') and
1998: (nvl(l_asset_fin_rec_new.deprn_method_code,
1999: l_asset_fin_rec_adj.deprn_method_code) is not null) and
2000: (fa_cache_pkg.fazccmt (
2001: X_method => nvl(l_asset_fin_rec_new.deprn_method_code,
2002: l_asset_fin_rec_adj.deprn_method_code),
2003: X_life => nvl(l_asset_fin_rec_new.life_in_months,
2004: l_asset_fin_rec_adj.life_in_months),

Line 2007: if (fa_cache_pkg.fazccmt_record.deprn_basis_rule_id is not null) then

2003: X_life => nvl(l_asset_fin_rec_new.life_in_months,
2004: l_asset_fin_rec_adj.life_in_months),
2005: p_log_level_rec => p_log_level_rec
2006: )) then
2007: if (fa_cache_pkg.fazccmt_record.deprn_basis_rule_id is not null) then
2008: if (fa_cache_pkg.fazcdbr_record.polish_rule in (
2009: FA_STD_TYPES.FAD_DBR_POLISH_1,
2010: FA_STD_TYPES.FAD_DBR_POLISH_2,
2011: FA_STD_TYPES.FAD_DBR_POLISH_3,

Line 2008: if (fa_cache_pkg.fazcdbr_record.polish_rule in (

2004: l_asset_fin_rec_adj.life_in_months),
2005: p_log_level_rec => p_log_level_rec
2006: )) then
2007: if (fa_cache_pkg.fazccmt_record.deprn_basis_rule_id is not null) then
2008: if (fa_cache_pkg.fazcdbr_record.polish_rule in (
2009: FA_STD_TYPES.FAD_DBR_POLISH_1,
2010: FA_STD_TYPES.FAD_DBR_POLISH_2,
2011: FA_STD_TYPES.FAD_DBR_POLISH_3,
2012: FA_STD_TYPES.FAD_DBR_POLISH_4,

Line 2335: if (fa_cache_pkg.fazcbc_record.allow_cip_dep_group_flag = 'Y') then

2331:
2332: -- copy the delta cost if any into the group's fin_rec
2333: if (p_asset_type_rec.asset_type = 'CIP') then
2334:
2335: if (fa_cache_pkg.fazcbc_record.allow_cip_dep_group_flag = 'Y') then
2336: l_src_asset_fin_rec_adj.cip_cost := nvl(l_asset_fin_rec_adj.cip_cost, 0);
2337: l_src_asset_fin_rec_adj.cost := nvl(l_asset_fin_rec_adj.cost, 0) - nvl(l_asset_fin_rec_adj.cip_cost, 0);
2338: else
2339: l_src_asset_fin_rec_adj.cip_cost := nvl(l_asset_fin_rec_adj.cost, 0);

Line 2585: and fa_cache_pkg.fazcbc_record.book_class = 'CORPORATE') then

2581: -- End of Depreciation Override
2582:
2583: -- save the group processed in the case of locking case...
2584: if (nvl(px_inv_trans_rec.transaction_type, 'X') = 'INVOICE TRANSFER'
2585: and fa_cache_pkg.fazcbc_record.book_class = 'CORPORATE') then
2586: if (px_inv_trans_rec.invoice_transaction_id = g_last_invoice_thid) then
2587: g_last_group_asset_id := null;
2588: g_last_invoice_thid := null;
2589: else