DBA Data[Home] [Help]

APPS.FA_AMORT_PVT dependencies on FA_BOOKS

Line 110: from fa_books_summary

106: , deprn_amount
107: , ytd_deprn
108: , reserve_adjustment_amount
109: , deprn_reserve
110: from fa_books_summary
111: where asset_id = p_asset_id
112: and book_type_code = p_book_type_code
113: and period_counter >= nvl(p_period_counter, 1);
114:

Line 344: from fa_books_summary bs

340: select bs.period_counter
341: , bs.calendar_period_close_date
342: , bs.fiscal_year
343: , bs.period_num
344: from fa_books_summary bs
345: where bs.asset_id = p_asset_hdr_rec.asset_id
346: and bs.book_type_code = p_asset_hdr_rec.book_type_code
347: order by period_counter desc;
348:

Line 474: fa_debug_pkg.add(l_calling_fn, 'Insert into', 'FA_BOOKS_SUMMARY', p_log_level_rec => p_log_level_rec);

470: END LOOP; -- i in 1..(p_period_rec.period_counter - l_last_period_counter)
471:
472:
473: if (p_log_level_rec.statement_level) then
474: fa_debug_pkg.add(l_calling_fn, 'Insert into', 'FA_BOOKS_SUMMARY', p_log_level_rec => p_log_level_rec);
475: end if;
476: --
477: -- Insert all necessary records from period where DPIS falls into
478: --

Line 664: INSERT INTO FA_BOOKS_SUMMARY(

660: AND BS.set_of_books_id = p_asset_hdr_rec.set_of_books_id;
661:
662: else
663: FORALL i in tbs_period_counter.FIRST..tbs_period_counter.LAST
664: INSERT INTO FA_BOOKS_SUMMARY(
665: ASSET_ID
666: , BOOK_TYPE_CODE
667: , PERIOD_COUNTER
668: , FISCAL_YEAR

Line 837: FROM FA_BOOKS_SUMMARY BS

833: , p_trans_rec.who_info.creation_date
834: , p_trans_rec.who_info.created_by
835: , p_trans_rec.who_info.last_update_date
836: , p_trans_rec.who_info.last_updated_by
837: FROM FA_BOOKS_SUMMARY BS
838: WHERE BS.ASSET_ID = p_asset_hdr_rec.asset_id
839: AND BS.BOOK_TYPE_CODE = p_asset_hdr_rec.book_type_code
840: AND BS.period_counter = l_last_period_counter;
841: end if; --p_mrc_sob_type_code = 'R'

Line 852: UPDATE FA_BOOKS_SUMMARY

848: WHERE ASSET_ID = p_asset_hdr_rec.asset_id
849: AND BOOK_TYPE_CODE = p_asset_hdr_rec.book_type_code
850: AND set_of_books_id = p_asset_hdr_rec.set_of_books_id;
851: else
852: UPDATE FA_BOOKS_SUMMARY
853: SET DEPRECIATE_FLAG = p_asset_fin_rec_new.depreciate_flag
854: WHERE ASSET_ID = p_asset_hdr_rec.asset_id
855: AND BOOK_TYPE_CODE = p_asset_hdr_rec.book_type_code;
856: end if;

Line 867: UPDATE FA_BOOKS_SUMMARY

863: WHERE ASSET_ID = p_asset_hdr_rec.asset_id
864: AND BOOK_TYPE_CODE = p_asset_hdr_rec.book_type_code
865: AND set_of_books_id = p_asset_hdr_rec.set_of_books_id;
866: else
867: UPDATE FA_BOOKS_SUMMARY
868: SET DISABLED_FLAG = p_asset_fin_rec_new.disabled_flag
869: WHERE ASSET_ID = p_asset_hdr_rec.asset_id
870: AND BOOK_TYPE_CODE = p_asset_hdr_rec.book_type_code;
871: end if;

Line 1011: -- What this function does is to recreate records in FA_BOOKS_SUMAMRY by

1007: --
1008: -- Description:
1009: -- This function should be called to maintain group asset that has not
1010: -- depreciated or a member asset has not assigned.
1011: -- What this function does is to recreate records in FA_BOOKS_SUMAMRY by
1012: -- deleting all of them and reinsert all of them.
1013: --
1014: --+==============================================================================
1015: FUNCTION createGroup(

Line 1073: DELETE FROM FA_BOOKS_SUMMARY

1069: WHERE ASSET_ID = p_asset_hdr_rec.asset_id
1070: AND BOOK_TYPE_CODE = p_asset_hdr_rec.book_type_code
1071: AND set_of_books_id = p_asset_hdr_rec.set_of_books_id;
1072: else
1073: DELETE FROM FA_BOOKS_SUMMARY
1074: WHERE ASSET_ID = p_asset_hdr_rec.asset_id
1075: AND BOOK_TYPE_CODE = p_asset_hdr_rec.book_type_code;
1076: end if;
1077:

Line 1083: -- Construct period information part for FA_BOOKS_SUMAMRY

1079: fa_debug_pkg.add(l_calling_fn, 'Construct Period information', '.', p_log_level_rec => p_log_level_rec);
1080: end if;
1081:
1082: --
1083: -- Construct period information part for FA_BOOKS_SUMAMRY
1084: --
1085: OPEN c_get_period_rec;
1086: FETCH c_get_period_rec BULK COLLECT INTO tbs_period_counter
1087: , tbs_calendar_period_open_date

Line 1114: fa_debug_pkg.add(l_calling_fn, 'Insert into', 'FA_BOOKS_SUMMARY', p_log_level_rec => p_log_level_rec);

1110: --
1111: tbs_reset_adjusted_cost_flag(1) := 'Y';
1112:
1113: if (p_log_level_rec.statement_level) then
1114: fa_debug_pkg.add(l_calling_fn, 'Insert into', 'FA_BOOKS_SUMMARY', p_log_level_rec => p_log_level_rec);
1115: end if;
1116: --
1117: -- Insert all necessary records from period where DPIS falls into
1118: --

Line 1300: INSERT INTO FA_BOOKS_SUMMARY(

1296:
1297: else
1298:
1299: FORALL i in tbs_period_counter.FIRST..tbs_period_counter.LAST
1300: INSERT INTO FA_BOOKS_SUMMARY(
1301: ASSET_ID
1302: , BOOK_TYPE_CODE
1303: , PERIOD_COUNTER
1304: , FISCAL_YEAR

Line 1531: from fa_books_summary

1527: CURSOR c_get_period_counters (c_date date,
1528: c_group_asset_id number) IS
1529: select period_counter,
1530: 0, 0, 0, 0, 0, null, 0, null, 0, 0, 0
1531: from fa_books_summary
1532: where asset_id = c_group_asset_id
1533: and book_type_code = p_asset_hdr_rec.book_type_code
1534: and calendar_period_close_date >= c_date
1535: order by period_counter;

Line 1545: , fa_books_summary bs

1541: , th.transaction_subtype
1542: , th.transaction_key
1543: , bs.period_counter
1544: from fa_transaction_headers th
1545: , fa_books_summary bs
1546: , fa_transaction_headers mth
1547: , fa_books bk
1548: where mth.transaction_header_id = p_trans_rec.member_transaction_header_id
1549: and th.asset_id = mth.asset_id

Line 1547: , fa_books bk

1543: , bs.period_counter
1544: from fa_transaction_headers th
1545: , fa_books_summary bs
1546: , fa_transaction_headers mth
1547: , fa_books bk
1548: where mth.transaction_header_id = p_trans_rec.member_transaction_header_id
1549: and th.asset_id = mth.asset_id
1550: and th.book_type_code = p_asset_hdr_rec.book_type_code
1551: and bs.asset_id = p_group_asset_id

Line 1576: from fa_books_summary bs

1572: , mth.transaction_type_code
1573: , mth.transaction_subtype
1574: , mth.transaction_key
1575: , bs.period_counter
1576: from fa_books_summary bs
1577: , fa_transaction_headers mth
1578: , fa_books bk
1579: where mth.transaction_header_id = p_trans_rec.member_transaction_header_id
1580: and bs.asset_id = p_group_asset_id

Line 1578: , fa_books bk

1574: , mth.transaction_key
1575: , bs.period_counter
1576: from fa_books_summary bs
1577: , fa_transaction_headers mth
1578: , fa_books bk
1579: where mth.transaction_header_id = p_trans_rec.member_transaction_header_id
1580: and bs.asset_id = p_group_asset_id
1581: and bs.book_type_code = p_asset_hdr_rec.book_type_code
1582: and bk.transaction_header_id_in = mth.transaction_header_id

Line 1628: from fa_books_summary bs

1624: --bug6912446
1625: -- Following cursors to get retirement period for reinstatement trx
1626: CURSOR c_get_ret_period (c_transaction_header_id number)IS
1627: select bs.period_counter
1628: from fa_books_summary bs
1629: , fa_retirements rt
1630: where bs.asset_id = p_group_asset_id
1631: and bs.book_type_code = p_asset_hdr_rec.book_type_code
1632: and rt.date_retired between bs.calendar_period_open_date and bs.calendar_period_close_date

Line 1670: from fa_books inbk,

1666: , inbk.deprn_limit_type
1667: , outbk.deprn_limit_type
1668: , inbk.allowed_deprn_limit
1669: , outbk.allowed_deprn_limit
1670: from fa_books inbk,
1671: fa_books outbk
1672: , fa_transaction_headers mth
1673: where mth.transaction_header_id = p_trans_rec.member_transaction_header_id
1674: and inbk.asset_id = mth.asset_id

Line 1671: fa_books outbk

1667: , outbk.deprn_limit_type
1668: , inbk.allowed_deprn_limit
1669: , outbk.allowed_deprn_limit
1670: from fa_books inbk,
1671: fa_books outbk
1672: , fa_transaction_headers mth
1673: where mth.transaction_header_id = p_trans_rec.member_transaction_header_id
1674: and inbk.asset_id = mth.asset_id
1675: and outbk.asset_id(+) = inbk.asset_id

Line 1816: -- Construct member asset table using group's data in FA_BOOKS_SUMMARY

1812: return TRUE;
1813:
1814: end if;
1815: --
1816: -- Construct member asset table using group's data in FA_BOOKS_SUMMARY
1817: --
1818: --tk_util.debug('c_date: '||to_char(p_date_placed_in_service, 'DD-MON-YYYY'));
1819: OPEN c_get_period_counters (p_date_placed_in_service,
1820: p_group_asset_id);

Line 2558: from fa_books inbk,

2554: CURSOR c_get_deltas IS
2555: select inbk.salvage_value - nvl(outbk.salvage_value, 0)
2556: , nvl(inbk.allowed_deprn_limit_amount, 0) -
2557: nvl(outbk.allowed_deprn_limit_amount, 0)
2558: from fa_books inbk,
2559: fa_books outbk
2560: where outbk.asset_id(+) = inbk.asset_id
2561: and outbk.book_type_code(+) = inbk.book_type_code
2562: and inbk.transaction_header_id_in = p_trans_rec.member_transaction_header_id

Line 2559: fa_books outbk

2555: select inbk.salvage_value - nvl(outbk.salvage_value, 0)
2556: , nvl(inbk.allowed_deprn_limit_amount, 0) -
2557: nvl(outbk.allowed_deprn_limit_amount, 0)
2558: from fa_books inbk,
2559: fa_books outbk
2560: where outbk.asset_id(+) = inbk.asset_id
2561: and outbk.book_type_code(+) = inbk.book_type_code
2562: and inbk.transaction_header_id_in = p_trans_rec.member_transaction_header_id
2563: and outbk.transaction_header_id_out(+) = inbk.transaction_header_id_in;

Line 2634: from fa_books_summary bs

2630: and ret.set_of_books_id = p_asset_hdr_rec.set_of_books_id;
2631:
2632: CURSOR c_check_record_exists IS
2633: select bs.period_counter
2634: from fa_books_summary bs
2635: where bs.asset_id = p_asset_hdr_rec.asset_id
2636: and bs.book_type_code = p_asset_hdr_rec.book_type_code
2637: and bs.period_counter = p_period_rec.period_counter;
2638:

Line 2735: /*Bug#8205561 - To populate fa_books_summary in case of dpis change*/

2731: end if;
2732:
2733: end if; -- (((px_asset_fin_rec_new.salvage_type = 'SUM') and
2734:
2735: /*Bug#8205561 - To populate fa_books_summary in case of dpis change*/
2736: if (p_trans_rec.transaction_type_code = 'GROUP ADJUSTMENT' and
2737: p_trans_rec.transaction_key = 'GJ' and
2738: p_asset_fin_rec_old.date_placed_in_service <> px_asset_fin_rec_new.date_placed_in_service) then
2739: -- Group adjustment in period of group addition before

Line 2914: UPDATE FA_BOOKS_SUMMARY

2910: AND SET_OF_BOOKS_ID = p_asset_hdr_rec.set_of_books_id;
2911:
2912: else
2913:
2914: UPDATE FA_BOOKS_SUMMARY
2915: SET RESET_ADJUSTED_COST_FLAG = 'Y'
2916: , SALVAGE_TYPE = px_asset_fin_rec_new.salvage_type
2917: , PERCENT_SALVAGE_VALUE = px_asset_fin_rec_new.percent_salvage_value
2918: , SALVAGE_VALUE = px_asset_fin_rec_new.salvage_value

Line 3068: UPDATE FA_BOOKS_SUMMARY

3064: AND SET_OF_BOOKS_ID = p_asset_hdr_rec.set_of_books_id;
3065:
3066: else
3067:
3068: UPDATE FA_BOOKS_SUMMARY
3069: SET RESET_ADJUSTED_COST_FLAG = 'Y'
3070: , CHANGE_IN_COST = CHANGE_IN_COST + nvl(p_asset_fin_rec_adj.cost, 0)
3071: , CHANGE_IN_CIP_COST = CHANGE_IN_CIP_COST + nvl(p_asset_fin_rec_adj.cip_cost, 0)
3072: , COST = COST + nvl(p_asset_fin_rec_adj.cost, 0)

Line 3178: from fa_books inbk

3174: -- This is to get date placed in service using transaction header id
3175: -- Bug4958977: Needed to modify to use older dpis
3176: CURSOR c_get_dpis (c_thid number) IS
3177: select least(inbk.date_placed_in_service, nvl(outbk.date_placed_in_service, inbk.date_placed_in_service))
3178: from fa_books inbk
3179: , fa_books outbk
3180: where inbk.transaction_header_id_in = c_thid
3181: and outbk.transaction_header_id_out(+) = inbk.transaction_header_id_in
3182: and outbk.asset_id(+) = inbk.asset_id

Line 3179: , fa_books outbk

3175: -- Bug4958977: Needed to modify to use older dpis
3176: CURSOR c_get_dpis (c_thid number) IS
3177: select least(inbk.date_placed_in_service, nvl(outbk.date_placed_in_service, inbk.date_placed_in_service))
3178: from fa_books inbk
3179: , fa_books outbk
3180: where inbk.transaction_header_id_in = c_thid
3181: and outbk.transaction_header_id_out(+) = inbk.transaction_header_id_in
3182: and outbk.asset_id(+) = inbk.asset_id
3183: and outbk.book_type_code(+) = inbk.book_type_code;

Line 3187: -- This is to get period counter using FA_BOOKS_SUMMARY table

3183: and outbk.book_type_code(+) = inbk.book_type_code;
3184:
3185:
3186: --
3187: -- This is to get period counter using FA_BOOKS_SUMMARY table
3188: --
3189: CURSOR c_get_books_summary(c_period_counter number) IS
3190: select
3191: bs.period_counter

Line 3269: from fa_books_summary bs

3265: , bs.change_in_eofy_reserve
3266: , 0 impairment_amount
3267: , 0 ytd_impairment
3268: , 0 impairment_reserve
3269: from fa_books_summary bs
3270: where bs.asset_id = p_asset_hdr_rec.asset_id
3271: and bs.book_type_code = p_asset_hdr_rec.book_type_code
3272: and bs.period_counter >= c_period_counter
3273: order by bs.period_counter;

Line 3367: from fa_books_summary

3363: CURSOR c_get_eofy_amts(c_period_counter number) IS
3364: select recoverable_cost
3365: , salvage_value
3366: , deprn_reserve
3367: from fa_books_summary
3368: where asset_id = p_asset_hdr_rec.asset_id
3369: and book_type_code = p_asset_hdr_rec.book_type_code
3370: and period_counter = c_period_counter;
3371:

Line 3419: from fa_books_summary bs

3415: and ret.set_of_books_id = p_asset_hdr_rec.set_of_books_id ;
3416:
3417: CURSOR c_check_record_exists IS
3418: select bs.period_counter
3419: from fa_books_summary bs
3420: where bs.asset_id = p_asset_hdr_rec.asset_id
3421: and bs.book_type_code = p_asset_hdr_rec.book_type_code
3422: and bs.period_counter = p_period_rec.period_counter;
3423:

Line 3462: l_temp_ind BINARY_INTEGER; -- Indicate where to start updating FA_BOOKS_SUMMARY

3458: -- the period where trx date
3459: -- falls into
3460:
3461: l_ind BINARY_INTEGER; -- Used to find delta amounts for each period
3462: l_temp_ind BINARY_INTEGER; -- Indicate where to start updating FA_BOOKS_SUMMARY
3463: l_old_reserve NUMBER;
3464:
3465: --
3466: -- Tables to store member delta information

Line 3593: from fa_books_summary

3589: l_chk_bs_row_exists VARCHAR2(1);
3590:
3591: CURSOR c_chk_bs_row_exists IS
3592: select 'Y'
3593: from fa_books_summary
3594: where book_type_code = p_asset_hdr_rec.book_type_code
3595: and group_asset_id = p_asset_hdr_rec.asset_id
3596: and asset_id <> group_asset_id
3597: and period_counter = l_recalc_start_period_counter - 1;

Line 3602: from fa_books_summary

3598:
3599: CURSOR c_get_mem_bs_row IS
3600: select ytd_deprn,deprn_reserve,bonus_ytd_deprn,bonus_deprn_reserve,
3601: eofy_reserve,ytd_impairment,impairment_reserve
3602: from fa_books_summary
3603: where book_type_code = p_asset_hdr_rec.book_type_code
3604: and asset_id = p_reclassed_asset_id
3605: and group_asset_id = p_asset_hdr_rec.asset_id
3606: and period_counter = l_trx_period_rec.period_counter - 1;

Line 3885: -- In case this is DESTINATION, group_asset_id in FA_BOOKS_SUMMARY must be updated before starting to

3881: -- if it is from between dpis and current, then build first row
3882: -- and apply it and then apply rest of records.
3883:
3884: -- HHIRAGA
3885: -- In case this is DESTINATION, group_asset_id in FA_BOOKS_SUMMARY must be updated before starting to
3886: -- processing
3887:
3888: if (p_reclass_src_dest = 'DESTINATION') and
3889: nvl(px_asset_fin_rec_new.tracking_method,'NULL') = 'ALLOCATE' then

Line 3920: update fa_books_summary

3916:
3917: -- Query YTD and Reserve from FA_DEPRN_SUMMARY for addition
3918: if p_mrc_sob_type_Code <> 'R' then
3919:
3920: update fa_books_summary
3921: set group_Asset_id = p_asset_hdr_rec.asset_id
3922: where asset_id=p_reclassed_asset_id
3923: and period_counter >= l_trx_period_rec.period_counter;
3924:

Line 3938: insert into fa_books_summary(book_type_code,

3934: g_mem_deprn_reserve := nvl(l_mem_deprn_reserve_addition,0);
3935: g_mem_eofy_reserve := g_mem_deprn_reserve - g_mem_ytd_deprn;
3936: end if;
3937:
3938: insert into fa_books_summary(book_type_code,
3939: asset_id,
3940: group_asset_id,
3941: period_counter,
3942: cost,

Line 4278: -- is fa_books_summary records needed to be updated.

4274: This part of code will be removed by adding new column change_in_eofy_reserve
4275: *****************
4276: --
4277: -- Setting period counter which is used to determine from which period
4278: -- is fa_books_summary records needed to be updated.
4279: -- If there is eofy_reserve in fin_rec_adj, need to get record from
4280: -- previous eofy record to reflect the amount and recalculate.
4281: --
4282: --tk_util.debug('p_asset_fin_rec_adj.eofy_reserve: '||to_char(p_asset_fin_rec_adj.eofy_reserve));

Line 4502: -- Get eofy information from fa_books_summary_table

4498: end if;
4499:
4500: if (l_count = 1) then
4501: --
4502: -- Get eofy information from fa_books_summary_table
4503: --
4504: if (p_mrc_sob_type_code = 'R') then
4505: OPEN c_get_mc_eofy_amts(fa_amort_pvt.t_period_counter(1) - fa_amort_pvt.t_period_num(1));
4506: FETCH c_get_mc_eofy_amts INTO l_eofy_rec_cost

Line 4534: -- Get eofy information from fa_books_summary_table

4530: end if;
4531:
4532: else
4533: --
4534: -- Get eofy information from fa_books_summary_table
4535: --
4536: if (p_mrc_sob_type_code = 'R') then
4537: OPEN c_get_mc_eofy_amts(fa_amort_pvt.t_period_counter(2) - fa_amort_pvt.t_period_num(2));
4538: FETCH c_get_mc_eofy_amts INTO l_eofy_rec_cost

Line 4806: -- Update FA_BOOKS_SUMMARY

4802: );
4803: end loop;
4804: */
4805: --
4806: -- Update FA_BOOKS_SUMMARY
4807: --
4808:
4809: -- *********************** --
4810: -- Main Loop Starts Here --

Line 6667: -- Update FA_BOOKS_SUMMARY

6663: -- End of HHIRAGA
6664:
6665: if (p_update_books_summary) then
6666: --
6667: -- Update FA_BOOKS_SUMMARY
6668: --
6669: --tk_util.debug('period# : cost: chcost: msal: exp: ytd: rsv: rsv');
6670: --tk_util.debug('period# : cost: adjcost: exp: eofy: rsvaj: rsv: dlmt: arec');
6671: /*

Line 6774: UPDATE FA_BOOKS_SUMMARY

6770: AND SET_OF_BOOKS_ID = p_asset_hdr_rec.set_of_books_id;
6771:
6772: else
6773: FORALL i in l_temp_ind..fa_amort_pvt.t_cost.LAST
6774: UPDATE FA_BOOKS_SUMMARY
6775: SET RESET_ADJUSTED_COST_FLAG = fa_amort_pvt.t_reset_adjusted_cost_flag(i)
6776: , CHANGE_IN_COST = fa_amort_pvt.t_change_in_cost(i)
6777: , CHANGE_IN_CIP_COST = fa_amort_pvt.t_change_in_cip_cost(i)
6778: , COST = fa_amort_pvt.t_cost(i)

Line 7164: from fa_books inbk

7160:
7161: -- Bug4958977: Adding following cursor and 2 new variables
7162: CURSOR c_check_dpis_change is
7163: select inbk.transaction_header_id_in
7164: from fa_books inbk
7165: , fa_books outbk
7166: where inbk.transaction_header_id_in = px_trans_rec.member_transaction_header_id
7167: and outbk.asset_id = inbk.asset_id
7168: and outbk.book_type_code = p_asset_hdr_rec.book_type_code

Line 7165: , fa_books outbk

7161: -- Bug4958977: Adding following cursor and 2 new variables
7162: CURSOR c_check_dpis_change is
7163: select inbk.transaction_header_id_in
7164: from fa_books inbk
7165: , fa_books outbk
7166: where inbk.transaction_header_id_in = px_trans_rec.member_transaction_header_id
7167: and outbk.asset_id = inbk.asset_id
7168: and outbk.book_type_code = p_asset_hdr_rec.book_type_code
7169: and outbk.transaction_header_id_out = px_trans_rec.member_transaction_header_id

Line 7411: -- No Need to Maintain FA_BOOKS_SUMMARY Table

7407: l_call_bs := FALSE;
7408: end if;
7409:
7410: if (not l_call_bs) then
7411: -- No Need to Maintain FA_BOOKS_SUMMARY Table
7412: return true;
7413: end if;
7414: end if;
7415:

Line 8388: from FA_BOOKS bk

8384:
8385:
8386: CURSOR c_cur_eofy_reserve IS
8387: select nvl(bk.eofy_reserve,0)
8388: from FA_BOOKS bk
8389: where asset_id = p_asset_hdr_rec.asset_id
8390: and book_type_code = p_asset_hdr_rec.book_type_code
8391: and transaction_header_id_out is null;
8392:

Line 8416: -- At current open period's transaction, get eofy_reserve from FA_BOOKS.

8412: if p_trans_rec_cur.transaction_header_id = p_trans_rec.transaction_header_id
8413: and p_trans_rec.transaction_date_entered between
8414: p_period_rec.calendar_period_open_date and p_period_rec.calendar_period_close_date
8415: then
8416: -- At current open period's transaction, get eofy_reserve from FA_BOOKS.
8417:
8418: x_transaction_header_id := to_number(null);
8419: x_transaction_date_entered := null;
8420: x_date_effective := null;

Line 8614: fa_books inbk,

8610: , decode(p_reclass_src_dest, 'SOURCE', -1, 1) * sum(nvl(inbk.allowed_deprn_limit_amount, 0) -
8611: nvl(outbk.allowed_deprn_limit_amount, 0))
8612: , decode(p_reclass_src_dest, 'SOURCE', -1, 1) * sum(nvl(inbk.cip_cost, 0) - nvl(outbk.cip_cost, 0))
8613: from fa_transaction_headers th,
8614: fa_books inbk,
8615: fa_books outbk
8616: where inbk.asset_id = p_asset_hdr_rec.asset_id
8617: and inbk.book_type_code = p_asset_hdr_rec.book_type_code
8618: and outbk.asset_id(+) = p_asset_hdr_rec.asset_id

Line 8615: fa_books outbk

8611: nvl(outbk.allowed_deprn_limit_amount, 0))
8612: , decode(p_reclass_src_dest, 'SOURCE', -1, 1) * sum(nvl(inbk.cip_cost, 0) - nvl(outbk.cip_cost, 0))
8613: from fa_transaction_headers th,
8614: fa_books inbk,
8615: fa_books outbk
8616: where inbk.asset_id = p_asset_hdr_rec.asset_id
8617: and inbk.book_type_code = p_asset_hdr_rec.book_type_code
8618: and outbk.asset_id(+) = p_asset_hdr_rec.asset_id
8619: and outbk.book_type_code(+) = p_asset_hdr_rec.book_type_code

Line 8894: from fa_books

8890: , prior_deprn_method
8891: , prior_life_in_months
8892: , prior_basic_rate
8893: , prior_adjusted_rate
8894: from fa_books
8895: where asset_id = p_asset_hdr_rec.asset_id
8896: and book_type_code = p_asset_hdr_rec.book_type_code
8897: and (transaction_header_id_out = p_trans_rec.transaction_header_id
8898: or (transaction_header_id_in < p_trans_rec.transaction_header_id and

Line 9015: from fa_books

9011: , prior_deprn_method
9012: , prior_life_in_months
9013: , prior_basic_rate
9014: , prior_adjusted_rate
9015: from fa_books
9016: where asset_id = p_asset_hdr_rec.asset_id
9017: and book_type_code = p_asset_hdr_rec.book_type_code
9018: and (transaction_header_id_out = p_init_transaction_header_id
9019: or (p_init_transaction_header_id > transaction_header_id_in and

Line 9457: from fa_books inbk,

9453: , inbk.prior_deprn_method
9454: , inbk.prior_life_in_months
9455: , inbk.prior_basic_rate
9456: , inbk.prior_adjusted_rate
9457: from fa_books inbk,
9458: fa_books outbk
9459: where inbk.asset_id = c_asset_id
9460: and inbk.asset_id = outbk.asset_id(+)
9461: and inbk.book_type_code = p_asset_hdr_rec.book_type_code

Line 9458: fa_books outbk

9454: , inbk.prior_life_in_months
9455: , inbk.prior_basic_rate
9456: , inbk.prior_adjusted_rate
9457: from fa_books inbk,
9458: fa_books outbk
9459: where inbk.asset_id = c_asset_id
9460: and inbk.asset_id = outbk.asset_id(+)
9461: and inbk.book_type_code = p_asset_hdr_rec.book_type_code
9462: and inbk.book_type_code = outbk.book_type_code(+)

Line 9833: from fa_books inbk,

9829: , inbk.prior_deprn_method
9830: , inbk.prior_life_in_months
9831: , inbk.prior_basic_rate
9832: , inbk.prior_adjusted_rate
9833: from fa_books inbk,
9834: fa_books outbk
9835: where inbk.asset_id = c_asset_id
9836: and inbk.asset_id = outbk.asset_id(+)
9837: and inbk.book_type_code = p_asset_hdr_rec.book_type_code

Line 9834: fa_books outbk

9830: , inbk.prior_life_in_months
9831: , inbk.prior_basic_rate
9832: , inbk.prior_adjusted_rate
9833: from fa_books inbk,
9834: fa_books outbk
9835: where inbk.asset_id = c_asset_id
9836: and inbk.asset_id = outbk.asset_id(+)
9837: and inbk.book_type_code = p_asset_hdr_rec.book_type_code
9838: and inbk.book_type_code = outbk.book_type_code(+)

Line 11193: FROM fa_books bk1

11189: if l_asset_fin_rec_adj.deprn_limit_type is not null then
11190:
11191: SELECT bk1.deprn_limit_type, nvl(bk1.allowed_deprn_limit_amount,0), nvl(bk1.allowed_deprn_limit,0)
11192: INTO l_tmp_deprn_limit_type, l_tmp_allowed_deprn_limit_amt, l_tmp_allowed_deprn_limit
11193: FROM fa_books bk1
11194: WHERE bk1.asset_id = p_asset_hdr_rec.asset_id
11195: and bk1.book_type_code = p_asset_hdr_rec.book_type_code
11196: and bk1.transaction_header_id_out is null;
11197:

Line 11231: FROM fa_books bk1

11227: if l_asset_fin_rec_adj.deprn_limit_type is not null then
11228:
11229: SELECT bk1.deprn_limit_type, nvl(bk1.allowed_deprn_limit_amount,0), nvl(bk1.allowed_deprn_limit,0)
11230: INTO l_tmp_deprn_limit_type, l_tmp_allowed_deprn_limit_amt, l_tmp_allowed_deprn_limit
11231: FROM fa_books bk1
11232: WHERE bk1.asset_id = p_asset_hdr_rec.asset_id
11233: and bk1.book_type_code = p_asset_hdr_rec.book_type_code
11234: and bk1.transaction_header_id_out is null;
11235:

Line 11640: fa_books bk

11636: from fa_calendar_periods cp,
11637: fa_book_controls bc,
11638: fa_fiscal_year fy,
11639: fa_calendar_types ct,
11640: fa_books bk
11641: WHERE bk.book_type_code = p_asset_hdr_rec.book_type_code
11642: and bk.asset_id = p_asset_hdr_rec.asset_id
11643: and bk.transaction_header_id_out is null
11644: and bc.book_type_code = p_asset_hdr_rec.book_type_code

Line 11858: fa_books bk

11854: th.trx_reference_id trx_reference_id,
11855: th.invoice_transaction_id,
11856: '1st SELECT in c_get_ths_adj'
11857: from fa_transaction_headers th,
11858: fa_books bk
11859: , fa_books outbk
11860: , fa_deprn_summary ds
11861: where th.asset_id = p_asset_hdr_rec.asset_id
11862: and th.book_type_code = p_asset_hdr_rec.book_type_code

Line 11859: , fa_books outbk

11855: th.invoice_transaction_id,
11856: '1st SELECT in c_get_ths_adj'
11857: from fa_transaction_headers th,
11858: fa_books bk
11859: , fa_books outbk
11860: , fa_deprn_summary ds
11861: where th.asset_id = p_asset_hdr_rec.asset_id
11862: and th.book_type_code = p_asset_hdr_rec.book_type_code
11863: and bk.asset_id = p_asset_hdr_rec.asset_id

Line 12002: from fa_books bk

11998: p_trans_rec.member_transaction_header_id member_transaction_header_id,
11999: p_trans_rec.trx_reference_id trx_reference_id,
12000: to_number(null), -- invoice_transaction_id
12001: '3rd SELECT in c_get_ths_adj'
12002: from fa_books bk
12003: where bk.asset_id = p_asset_hdr_rec.asset_id
12004: and bk.book_type_code = p_asset_hdr_rec.book_type_code
12005: and bk.transaction_header_id_out is null
12006: and p_trans_rec.transaction_type_code

Line 12033: fa_books bk

12029: and th.date_effective > c_date_effective
12030: and (p_asset_type_rec.asset_type <> G_ASSET_TYPE_GROUP or
12031: not exists (select 'Y'
12032: from fa_transaction_headers mth,
12033: fa_books bk
12034: where mth.transaction_header_id = th.member_transaction_header_id
12035: and mth.book_type_code = p_asset_hdr_rec.book_type_code
12036: and bk.asset_id = mth.asset_id
12037: and bk.book_type_code = p_asset_hdr_rec.book_type_code

Line 12054: fa_books bk

12050: and p_trans_rec.who_info.creation_date = c_date_effective
12051: and (p_asset_type_rec.asset_type <> G_ASSET_TYPE_GROUP or
12052: not exists (select 'Y'
12053: from fa_transaction_headers mth,
12054: fa_books bk
12055: where mth.transaction_header_id = p_trans_rec.member_transaction_header_id
12056: and mth.book_type_code = p_asset_hdr_rec.book_type_code
12057: and bk.asset_id = mth.asset_id
12058: and bk.book_type_code = p_asset_hdr_rec.book_type_code

Line 12086: -- regression for adjusted cost in fa_books. This line was

12082: from fa_retirements
12083: where transaction_header_id_in = c_transaction_header_id
12084: and transaction_header_id_out is null ;
12085: -- 7130809 pulled out the below code line as this is creating
12086: -- regression for adjusted cost in fa_books. This line was
12087: -- added for the Bug# 6341966
12088: /*or transaction_header_id_out = p_trans_rec.transaction_header_id; */
12089: -- Bug#6341966,Added condition to pick the reinstated retirement on asset.
12090:

Line 12308: fa_books bk

12304: where asset_id = p_asset_hdr_rec.asset_id
12305: and book_type_code = p_asset_hdr_rec.book_type_code
12306: and not exists (select 'Y'
12307: from fa_transaction_headers mth,
12308: fa_books bk
12309: where mth.transaction_header_id = th.member_transaction_header_id
12310: and mth.book_type_code = p_asset_hdr_rec.book_type_code
12311: and bk.asset_id = mth.asset_id
12312: and bk.book_type_code = p_asset_hdr_rec.book_type_code

Line 12327: fa_books bk

12323: p_trans_rec.transaction_type_code transaction_type_code
12324: from dual
12325: where not exists (select 'Y'
12326: from fa_transaction_headers mth,
12327: fa_books bk
12328: where mth.transaction_header_id = p_trans_rec.member_transaction_header_id
12329: and mth.book_type_code = p_asset_hdr_rec.book_type_code
12330: and bk.asset_id = mth.asset_id
12331: and bk.book_type_code = p_asset_hdr_rec.book_type_code

Line 12348: fa_books gbk

12344: CURSOR c_get_init_trx2 (c_transaction_header_id number) IS
12345: select outgth.transaction_header_id
12346: from fa_transaction_headers outgth,
12347: fa_transaction_headers ingth,
12348: fa_books gbk
12349: where outgth.asset_id = p_asset_hdr_rec.asset_id
12350: and outgth.book_type_code = p_asset_hdr_rec.book_type_code
12351: and outgth.transaction_header_id <= c_transaction_header_id
12352: and ingth.asset_id = p_asset_hdr_rec.asset_id

Line 12358: fa_books bk

12354: and gbk.transaction_header_id_out = outgth.transaction_header_id
12355: and gbk.transaction_header_id_in = ingth.transaction_header_id
12356: and not exists (select 1
12357: from fa_transaction_headers mth,
12358: fa_books bk
12359: where mth.transaction_header_id = ingth.member_transaction_header_id
12360: and mth.asset_id = bk.asset_id
12361: and bk.book_type_code = p_asset_hdr_rec.book_type_code
12362: and bk.transaction_header_id_out is null

Line 12395: , fa_books bk

12391: , th.transaction_date_entered
12392: , th.date_effective
12393: , th.transaction_type_code
12394: from fa_transaction_headers th
12395: , fa_books bk
12396: where bk.transaction_header_id_out < c_thid
12397: and bk.book_type_code = p_asset_hdr_rec.book_type_code
12398: and th.book_type_code = p_asset_hdr_rec.book_type_code
12399: and th.asset_id = p_asset_hdr_rec.asset_id

Line 12490: -- to find starting fa_books record

12486: l_asset_fin_rec_new FA_API_TYPES.asset_fin_rec_type;
12487: l_asset_retire_rec FA_API_TYPES.asset_retire_rec_type;
12488:
12489: l_least_thid number(15); -- Stored least transaction_header_id
12490: -- to find starting fa_books record
12491: l_member_asset_id number(15) := to_number(null); -- Store member asset id
12492: l_member_trx_key varchar2(2); -- member transaction key
12493: l_member_hdr_rec FA_API_TYPES.asset_hdr_rec_type;
12494: l_next_period_rec FA_API_TYPES.period_rec_type;

Line 13918: -- Construct new fa_books row.

13914:
13915: end if; -- l_trans_rec.transaction_type_code in (G_TRX_TYPE_FUL_RET, G_TRX_TYPE_PAR_RET)
13916:
13917: --
13918: -- Construct new fa_books row.
13919: -- For first transaction, also get initial fa_books row.
13920: if (l_process_this_trx) or
13921: ((i = 1) and (l_row_count < l_limit)) then
13922:

Line 13919: -- For first transaction, also get initial fa_books row.

13915: end if; -- l_trans_rec.transaction_type_code in (G_TRX_TYPE_FUL_RET, G_TRX_TYPE_PAR_RET)
13916:
13917: --
13918: -- Construct new fa_books row.
13919: -- For first transaction, also get initial fa_books row.
13920: if (l_process_this_trx) or
13921: ((i = 1) and (l_row_count < l_limit)) then
13922:
13923: if (p_log_level_rec.statement_level) then

Line 14749: from fa_books bk

14745: -- Bug 5726160
14746: declare
14747: cursor c_depreciate_flag is
14748: select bk.depreciate_flag
14749: from fa_books bk
14750: ,fa_deprn_periods dp
14751: where bk.asset_id = p_asset_hdr_rec.asset_id
14752: and bk.book_type_code = p_asset_hdr_rec.book_type_code
14753: and bk.date_effective <= nvl(dp.period_close_date, sysdate)

Line 15801: from fa_books bk

15797: l_asset_fin_rec.rate_adjustment_factor,
15798: l_asset_fin_rec.prorate_date,
15799: l_asset_fin_rec.deprn_start_date,
15800: l_asset_fin_rec.date_placed_in_service
15801: from fa_books bk
15802: where bk.book_type_code = p_asset_hdr_rec.book_type_code
15803: and bk.asset_id = p_asset_hdr_rec.asset_id
15804: and bk.transaction_header_id_in = p_add_txn_id;
15805: end if;

Line 16792: from fa_books_summary

16788:
16789:
16790: CURSOR c_chk_bs_row_exists IS
16791: select 'Y'
16792: from fa_books_summary
16793: where book_type_code = p_asset_hdr_rec.book_type_code
16794: and group_asset_id = p_asset_hdr_rec.asset_id
16795: and asset_id <> group_asset_id
16796: and period_counter = l_recalc_start_period_counter - 1;

Line 17129: from fa_books bks,

17125:
17126: -- Bug 7138798: Check for any transaction in current fiscal year
17127: select count(*)
17128: into l_last_trx_count
17129: from fa_books bks,
17130: fa_deprn_periods dp
17131: where bks.asset_id = p_asset_hdr_rec.asset_id
17132: and bks.book_type_code = p_asset_hdr_rec.book_type_code
17133: and bks.date_ineffective is null

Line 17322: -- FA_BOOKS_SUMMARY. Not for calculating a catch-up.

17318: end if;
17319:
17320: --
17321: -- Purpose of calling CurrentPeriodAdj is to reflect the trx to
17322: -- FA_BOOKS_SUMMARY. Not for calculating a catch-up.
17323: -- Call CurrentPeriodAdj if:
17324: -- This is group asset.
17325: -- This is current period trx
17326: -- This is not member ret/rein, group reclass or group reclas with enter.

Line 17401: from fa_books inbk

17397: , inbk.cip_cost
17398: , inbk.salvage_value
17399: , inbk.allowed_deprn_limit_amount
17400: , bs.period_counter
17401: from fa_books inbk
17402: , fa_books outbk
17403: , fa_transaction_headers inth
17404: , fa_transaction_headers outth
17405: , fa_books_summary bs

Line 17402: , fa_books outbk

17398: , inbk.salvage_value
17399: , inbk.allowed_deprn_limit_amount
17400: , bs.period_counter
17401: from fa_books inbk
17402: , fa_books outbk
17403: , fa_transaction_headers inth
17404: , fa_transaction_headers outth
17405: , fa_books_summary bs
17406: where inbk.transaction_header_id_in = p_transaction_header_id

Line 17405: , fa_books_summary bs

17401: from fa_books inbk
17402: , fa_books outbk
17403: , fa_transaction_headers inth
17404: , fa_transaction_headers outth
17405: , fa_books_summary bs
17406: where inbk.transaction_header_id_in = p_transaction_header_id
17407: and outbk.asset_id = inbk.asset_id
17408: and outbk.book_type_code = p_book_type_code
17409: and outbk.transaction_header_id_out = p_transaction_header_id

Line 17468: from fa_books

17464: l_calling_fn varchar2(100) := 'FA_AMORT_PVT.check_member_existence';
17465:
17466: CURSOR c_mem_exists IS
17467: select transaction_header_id_in
17468: from fa_books
17469: where group_asset_id = p_asset_hdr_rec.asset_id
17470: and book_type_code = p_asset_hdr_rec.book_type_code
17471: and transaction_header_id_out is null;
17472: