DBA Data[Home] [Help]

APPS.FA_AMORT_PVT dependencies on FA_BOOKS

Line 74: from fa_books_summary

70: , deprn_amount
71: , ytd_deprn
72: , reserve_adjustment_amount
73: , deprn_reserve
74: from fa_books_summary
75: where asset_id = p_asset_id
76: and book_type_code = p_book_type_code
77: and period_counter >= nvl(p_period_counter, 1);
78:

Line 302: from fa_books_summary_mrc_v bs

298: select bs.period_counter
299: , bs.calendar_period_close_date
300: , bs.fiscal_year
301: , bs.period_num
302: from fa_books_summary_mrc_v bs
303: where bs.asset_id = p_asset_hdr_rec.asset_id
304: and bs.book_type_code = p_asset_hdr_rec.book_type_code
305: order by period_counter desc;
306:

Line 312: from fa_books_summary bs

308: select bs.period_counter
309: , bs.calendar_period_close_date
310: , bs.fiscal_year
311: , bs.period_num
312: from fa_books_summary bs
313: where bs.asset_id = p_asset_hdr_rec.asset_id
314: and bs.book_type_code = p_asset_hdr_rec.book_type_code
315: order by period_counter desc;
316:

Line 445: fa_debug_pkg.add(l_calling_fn, 'Insert into', 'FA_BOOKS_SUMMARY'

441: END LOOP; -- i in 1..(p_period_rec.period_counter - l_last_period_counter)
442:
443:
444: if (p_log_level_rec.statement_level) then
445: fa_debug_pkg.add(l_calling_fn, 'Insert into', 'FA_BOOKS_SUMMARY'
446: ,p_log_level_rec => p_log_level_rec);
447: end if;
448: --
449: -- Insert all necessary records from period where DPIS falls into

Line 453: INSERT INTO FA_BOOKS_SUMMARY_MRC_V(

449: -- Insert all necessary records from period where DPIS falls into
450: --
451: if p_mrc_sob_type_code = 'R' then
452: FORALL i in tbs_period_counter.FIRST..tbs_period_counter.LAST
453: INSERT INTO FA_BOOKS_SUMMARY_MRC_V(
454: ASSET_ID
455: , BOOK_TYPE_CODE
456: , PERIOD_COUNTER
457: , FISCAL_YEAR

Line 620: FROM FA_BOOKS_SUMMARY_MRC_V BS

616: , p_trans_rec.who_info.creation_date
617: , p_trans_rec.who_info.created_by
618: , p_trans_rec.who_info.last_update_date
619: , p_trans_rec.who_info.last_updated_by
620: FROM FA_BOOKS_SUMMARY_MRC_V BS
621: WHERE BS.ASSET_ID = p_asset_hdr_rec.asset_id
622: AND BS.BOOK_TYPE_CODE = p_asset_hdr_rec.book_type_code
623: AND BS.period_counter = l_last_period_counter;
624:

Line 627: INSERT INTO FA_BOOKS_SUMMARY(

623: AND BS.period_counter = l_last_period_counter;
624:
625: else
626: FORALL i in tbs_period_counter.FIRST..tbs_period_counter.LAST
627: INSERT INTO FA_BOOKS_SUMMARY(
628: ASSET_ID
629: , BOOK_TYPE_CODE
630: , PERIOD_COUNTER
631: , FISCAL_YEAR

Line 794: FROM FA_BOOKS_SUMMARY BS

790: , p_trans_rec.who_info.creation_date
791: , p_trans_rec.who_info.created_by
792: , p_trans_rec.who_info.last_update_date
793: , p_trans_rec.who_info.last_updated_by
794: FROM FA_BOOKS_SUMMARY BS
795: WHERE BS.ASSET_ID = p_asset_hdr_rec.asset_id
796: AND BS.BOOK_TYPE_CODE = p_asset_hdr_rec.book_type_code
797: AND BS.period_counter = l_last_period_counter;
798: end if; --p_mrc_sob_type_code = 'R'

Line 803: UPDATE FA_BOOKS_SUMMARY_MRC_V

799:
800: if p_depreciate_flag_change then
801:
802: if p_mrc_sob_type_code = 'R' then
803: UPDATE FA_BOOKS_SUMMARY_MRC_V
804: SET DEPRECIATE_FLAG = p_asset_fin_rec_new.depreciate_flag
805: WHERE ASSET_ID = p_asset_hdr_rec.asset_id
806: AND BOOK_TYPE_CODE = p_asset_hdr_rec.book_type_code;
807: else

Line 808: UPDATE FA_BOOKS_SUMMARY

804: SET DEPRECIATE_FLAG = p_asset_fin_rec_new.depreciate_flag
805: WHERE ASSET_ID = p_asset_hdr_rec.asset_id
806: AND BOOK_TYPE_CODE = p_asset_hdr_rec.book_type_code;
807: else
808: UPDATE FA_BOOKS_SUMMARY
809: SET DEPRECIATE_FLAG = p_asset_fin_rec_new.depreciate_flag
810: WHERE ASSET_ID = p_asset_hdr_rec.asset_id
811: AND BOOK_TYPE_CODE = p_asset_hdr_rec.book_type_code;
812: end if;

Line 817: UPDATE FA_BOOKS_SUMMARY_MRC_V

813:
814: elsif p_disabled_flag_change then
815:
816: if p_mrc_sob_type_code = 'R' then
817: UPDATE FA_BOOKS_SUMMARY_MRC_V
818: SET DISABLED_FLAG = p_asset_fin_rec_new.depreciate_flag
819: WHERE ASSET_ID = p_asset_hdr_rec.asset_id
820: AND BOOK_TYPE_CODE = p_asset_hdr_rec.book_type_code;
821: else

Line 822: UPDATE FA_BOOKS_SUMMARY

818: SET DISABLED_FLAG = p_asset_fin_rec_new.depreciate_flag
819: WHERE ASSET_ID = p_asset_hdr_rec.asset_id
820: AND BOOK_TYPE_CODE = p_asset_hdr_rec.book_type_code;
821: else
822: UPDATE FA_BOOKS_SUMMARY
823: SET DISABLED_FLAG = p_asset_fin_rec_new.depreciate_flag
824: WHERE ASSET_ID = p_asset_hdr_rec.asset_id
825: AND BOOK_TYPE_CODE = p_asset_hdr_rec.book_type_code;
826: end if;

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

960: --
961: -- Description:
962: -- This function should be called to maintain group asset that has not
963: -- depreciated or a member asset has not assigned.
964: -- What this function does is to recreate records in FA_BOOKS_SUMAMRY by
965: -- deleting all of them and reinsert all of them.
966: --
967: --+==============================================================================
968: FUNCTION createGroup(

Line 1021: DELETE FROM FA_BOOKS_SUMMARY_MRC_V

1017: --
1018: -- Delete all records for this group asset to recreate them
1019: --
1020: if p_mrc_sob_type_code = 'R' then
1021: DELETE FROM FA_BOOKS_SUMMARY_MRC_V
1022: WHERE ASSET_ID = p_asset_hdr_rec.asset_id
1023: AND BOOK_TYPE_CODE = p_asset_hdr_rec.book_type_code;
1024: else
1025: DELETE FROM FA_BOOKS_SUMMARY

Line 1025: DELETE FROM FA_BOOKS_SUMMARY

1021: DELETE FROM FA_BOOKS_SUMMARY_MRC_V
1022: WHERE ASSET_ID = p_asset_hdr_rec.asset_id
1023: AND BOOK_TYPE_CODE = p_asset_hdr_rec.book_type_code;
1024: else
1025: DELETE FROM FA_BOOKS_SUMMARY
1026: WHERE ASSET_ID = p_asset_hdr_rec.asset_id
1027: AND BOOK_TYPE_CODE = p_asset_hdr_rec.book_type_code;
1028: end if;
1029:

Line 1036: -- Construct period information part for FA_BOOKS_SUMAMRY

1032: ,p_log_level_rec => p_log_level_rec);
1033: end if;
1034:
1035: --
1036: -- Construct period information part for FA_BOOKS_SUMAMRY
1037: --
1038: OPEN c_get_period_rec;
1039: FETCH c_get_period_rec BULK COLLECT INTO tbs_period_counter
1040: , tbs_calendar_period_open_date

Line 1067: fa_debug_pkg.add(l_calling_fn, 'Insert into', 'FA_BOOKS_SUMMARY'

1063: --
1064: tbs_reset_adjusted_cost_flag(1) := 'Y';
1065:
1066: if (p_log_level_rec.statement_level) then
1067: fa_debug_pkg.add(l_calling_fn, 'Insert into', 'FA_BOOKS_SUMMARY'
1068: ,p_log_level_rec => p_log_level_rec);
1069: end if;
1070: --
1071: -- Insert all necessary records from period where DPIS falls into

Line 1075: INSERT INTO FA_BOOKS_SUMMARY_MRC_V(

1071: -- Insert all necessary records from period where DPIS falls into
1072: --
1073: if p_mrc_sob_type_code = 'R' then
1074: FORALL i in tbs_period_counter.FIRST..tbs_period_counter.LAST
1075: INSERT INTO FA_BOOKS_SUMMARY_MRC_V(
1076: ASSET_ID
1077: , BOOK_TYPE_CODE
1078: , PERIOD_COUNTER
1079: , FISCAL_YEAR

Line 1246: INSERT INTO FA_BOOKS_SUMMARY(

1242:
1243: else
1244:
1245: FORALL i in tbs_period_counter.FIRST..tbs_period_counter.LAST
1246: INSERT INTO FA_BOOKS_SUMMARY(
1247: ASSET_ID
1248: , BOOK_TYPE_CODE
1249: , PERIOD_COUNTER
1250: , FISCAL_YEAR

Line 1471: from fa_books_summary

1467: CURSOR c_get_period_counters (c_date date,
1468: c_group_asset_id number) IS
1469: select period_counter,
1470: 0, 0, 0, 0, 0, null, 0, null, 0, 0, 0
1471: from fa_books_summary
1472: where asset_id = c_group_asset_id
1473: and book_type_code = p_asset_hdr_rec.book_type_code
1474: and calendar_period_close_date >= c_date
1475: order by period_counter;

Line 1485: , fa_books_summary bs

1481: , th.transaction_subtype
1482: , th.transaction_key
1483: , bs.period_counter
1484: from fa_transaction_headers th
1485: , fa_books_summary bs
1486: , fa_transaction_headers mth
1487: , fa_books bk
1488: where mth.transaction_header_id = p_trans_rec.member_transaction_header_id
1489: and th.asset_id = mth.asset_id

Line 1487: , fa_books bk

1483: , bs.period_counter
1484: from fa_transaction_headers th
1485: , fa_books_summary bs
1486: , fa_transaction_headers mth
1487: , fa_books bk
1488: where mth.transaction_header_id = p_trans_rec.member_transaction_header_id
1489: and th.asset_id = mth.asset_id
1490: and th.book_type_code = p_asset_hdr_rec.book_type_code
1491: and bs.asset_id = p_group_asset_id

Line 1517: from fa_books_summary bs

1513: , mth.transaction_type_code
1514: , mth.transaction_subtype
1515: , mth.transaction_key
1516: , bs.period_counter
1517: from fa_books_summary bs
1518: , fa_transaction_headers mth
1519: , fa_books bk
1520: where mth.transaction_header_id = p_trans_rec.member_transaction_header_id
1521: and bs.asset_id = p_group_asset_id

Line 1519: , fa_books bk

1515: , mth.transaction_key
1516: , bs.period_counter
1517: from fa_books_summary bs
1518: , fa_transaction_headers mth
1519: , fa_books bk
1520: where mth.transaction_header_id = p_trans_rec.member_transaction_header_id
1521: and bs.asset_id = p_group_asset_id
1522: and bs.book_type_code = p_asset_hdr_rec.book_type_code
1523: and bk.transaction_header_id_in = mth.transaction_header_id

Line 1594: from fa_books inbk,

1590: , inbk.deprn_limit_type
1591: , outbk.deprn_limit_type
1592: , inbk.allowed_deprn_limit
1593: , outbk.allowed_deprn_limit
1594: from fa_books inbk,
1595: fa_books outbk
1596: , fa_transaction_headers mth
1597: where mth.transaction_header_id = p_trans_rec.member_transaction_header_id
1598: and inbk.asset_id = mth.asset_id

Line 1595: fa_books outbk

1591: , outbk.deprn_limit_type
1592: , inbk.allowed_deprn_limit
1593: , outbk.allowed_deprn_limit
1594: from fa_books inbk,
1595: fa_books outbk
1596: , fa_transaction_headers mth
1597: where mth.transaction_header_id = p_trans_rec.member_transaction_header_id
1598: and inbk.asset_id = mth.asset_id
1599: and outbk.asset_id(+) = inbk.asset_id

Line 1629: from fa_books_mrc_v inbk,

1625: , inbk.deprn_limit_type
1626: , outbk.deprn_limit_type
1627: , inbk.allowed_deprn_limit
1628: , outbk.allowed_deprn_limit
1629: from fa_books_mrc_v inbk,
1630: fa_books_mrc_v outbk
1631: , fa_transaction_headers mth
1632: where mth.transaction_header_id = p_trans_rec.member_transaction_header_id
1633: and inbk.asset_id = mth.asset_id

Line 1630: fa_books_mrc_v outbk

1626: , outbk.deprn_limit_type
1627: , inbk.allowed_deprn_limit
1628: , outbk.allowed_deprn_limit
1629: from fa_books_mrc_v inbk,
1630: fa_books_mrc_v outbk
1631: , fa_transaction_headers mth
1632: where mth.transaction_header_id = p_trans_rec.member_transaction_header_id
1633: and inbk.asset_id = mth.asset_id
1634: and outbk.asset_id(+) = inbk.asset_id

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

1737: return TRUE;
1738:
1739: end if;
1740: --
1741: -- Construct member asset table using group's data in FA_BOOKS_SUMMARY
1742: --
1743: --tk_util.debug('c_date: '||to_char(p_date_placed_in_service, 'DD-MON-YYYY'));
1744: OPEN c_get_period_counters (p_date_placed_in_service,
1745: p_group_asset_id);

Line 2574: from fa_books inbk,

2570: CURSOR c_get_deltas IS
2571: select inbk.salvage_value - nvl(outbk.salvage_value, 0)
2572: , nvl(inbk.allowed_deprn_limit_amount, 0) -
2573: nvl(outbk.allowed_deprn_limit_amount, 0)
2574: from fa_books inbk,
2575: fa_books outbk
2576: where outbk.asset_id(+) = inbk.asset_id
2577: and outbk.book_type_code(+) = inbk.book_type_code
2578: and inbk.transaction_header_id_in = p_trans_rec.member_transaction_header_id

Line 2575: fa_books outbk

2571: select inbk.salvage_value - nvl(outbk.salvage_value, 0)
2572: , nvl(inbk.allowed_deprn_limit_amount, 0) -
2573: nvl(outbk.allowed_deprn_limit_amount, 0)
2574: from fa_books inbk,
2575: fa_books outbk
2576: where outbk.asset_id(+) = inbk.asset_id
2577: and outbk.book_type_code(+) = inbk.book_type_code
2578: and inbk.transaction_header_id_in = p_trans_rec.member_transaction_header_id
2579: and outbk.transaction_header_id_out(+) = inbk.transaction_header_id_in;

Line 2585: from fa_books_mrc_v inbk,

2581: CURSOR c_get_mc_deltas IS
2582: select inbk.salvage_value - nvl(outbk.salvage_value, 0)
2583: , nvl(inbk.allowed_deprn_limit_amount, 0) -
2584: nvl(outbk.allowed_deprn_limit_amount, 0)
2585: from fa_books_mrc_v inbk,
2586: fa_books_mrc_v outbk
2587: where outbk.asset_id(+) = inbk.asset_id
2588: and outbk.book_type_code(+) = inbk.book_type_code
2589: and inbk.transaction_header_id_in = p_trans_rec.member_transaction_header_id

Line 2586: fa_books_mrc_v outbk

2582: select inbk.salvage_value - nvl(outbk.salvage_value, 0)
2583: , nvl(inbk.allowed_deprn_limit_amount, 0) -
2584: nvl(outbk.allowed_deprn_limit_amount, 0)
2585: from fa_books_mrc_v inbk,
2586: fa_books_mrc_v outbk
2587: where outbk.asset_id(+) = inbk.asset_id
2588: and outbk.book_type_code(+) = inbk.book_type_code
2589: and inbk.transaction_header_id_in = p_trans_rec.member_transaction_header_id
2590: and outbk.transaction_header_id_out(+) = inbk.transaction_header_id_in;

Line 2646: from fa_books_summary bs

2642: and ret.transaction_header_id_out = c_transaction_header_id;
2643:
2644: CURSOR c_check_record_exists IS
2645: select bs.period_counter
2646: from fa_books_summary bs
2647: where bs.asset_id = p_asset_hdr_rec.asset_id
2648: and bs.book_type_code = p_asset_hdr_rec.book_type_code
2649: and bs.period_counter = p_period_rec.period_counter;
2650:

Line 2653: from fa_books_summary_mrc_v bs

2649: and bs.period_counter = p_period_rec.period_counter;
2650:
2651: CURSOR c_check_mc_record_exists IS
2652: select bs.period_counter
2653: from fa_books_summary_mrc_v bs
2654: where bs.asset_id = p_asset_hdr_rec.asset_id
2655: and bs.book_type_code = p_asset_hdr_rec.book_type_code
2656: and bs.period_counter = p_period_rec.period_counter;
2657:

Line 2860: UPDATE FA_BOOKS_SUMMARY_MRC_V

2856: --tk_util.debug('l_reserve_amount: '||to_char(l_reserve_amount));
2857:
2858: if (p_mrc_sob_type_code = 'R') then
2859:
2860: UPDATE FA_BOOKS_SUMMARY_MRC_V
2861: SET RESET_ADJUSTED_COST_FLAG = 'Y'
2862: , SALVAGE_TYPE = px_asset_fin_rec_new.salvage_type
2863: , PERCENT_SALVAGE_VALUE = px_asset_fin_rec_new.percent_salvage_value
2864: , SALVAGE_VALUE = px_asset_fin_rec_new.salvage_value

Line 2907: UPDATE FA_BOOKS_SUMMARY

2903: AND PERIOD_COUNTER = p_period_rec.period_counter;
2904:
2905: else
2906:
2907: UPDATE FA_BOOKS_SUMMARY
2908: SET RESET_ADJUSTED_COST_FLAG = 'Y'
2909: , SALVAGE_TYPE = px_asset_fin_rec_new.salvage_type
2910: , PERCENT_SALVAGE_VALUE = px_asset_fin_rec_new.percent_salvage_value
2911: , SALVAGE_VALUE = px_asset_fin_rec_new.salvage_value

Line 3024: UPDATE FA_BOOKS_SUMMARY_MRC_V

3020: --tk_util.debug('l_reserve_amount: '||to_char(l_reserve_amount));
3021:
3022: if (p_mrc_sob_type_code = 'R') then
3023:
3024: UPDATE FA_BOOKS_SUMMARY_MRC_V
3025: SET RESET_ADJUSTED_COST_FLAG = 'Y'
3026: , CHANGE_IN_COST = CHANGE_IN_COST + nvl(p_asset_fin_rec_adj.cost, 0)
3027: , CHANGE_IN_CIP_COST = CHANGE_IN_CIP_COST + nvl(p_asset_fin_rec_adj.cip_cost, 0)
3028: , COST = px_asset_fin_rec_new.cost

Line 3060: UPDATE FA_BOOKS_SUMMARY

3056: AND PERIOD_COUNTER = p_period_rec.period_counter;
3057:
3058: else
3059:
3060: UPDATE FA_BOOKS_SUMMARY
3061: SET RESET_ADJUSTED_COST_FLAG = 'Y'
3062: , CHANGE_IN_COST = CHANGE_IN_COST + nvl(p_asset_fin_rec_adj.cost, 0)
3063: , CHANGE_IN_CIP_COST = CHANGE_IN_CIP_COST + nvl(p_asset_fin_rec_adj.cip_cost, 0)
3064: , COST = COST + nvl(p_asset_fin_rec_adj.cost, 0)

Line 3173: from fa_books inbk

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

Line 3174: , fa_books outbk

3170: -- Bug4958977: Needed to modify to use older dpis
3171: CURSOR c_get_dpis (c_thid number) IS
3172: select least(inbk.date_placed_in_service, nvl(outbk.date_placed_in_service, inbk.date_placed_in_service))
3173: from fa_books inbk
3174: , fa_books outbk
3175: where inbk.transaction_header_id_in = c_thid
3176: and outbk.transaction_header_id_out(+) = inbk.transaction_header_id_in
3177: and outbk.asset_id(+) = inbk.asset_id
3178: and outbk.book_type_code(+) = inbk.book_type_code;

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

3177: and outbk.asset_id(+) = inbk.asset_id
3178: and outbk.book_type_code(+) = inbk.book_type_code;
3179:
3180: --
3181: -- This is to get period counter using FA_BOOKS_SUMMARY table
3182: --
3183: CURSOR c_get_books_summary(c_period_counter number) IS
3184: select
3185: bs.period_counter

Line 3257: from fa_books_summary bs

3253: , bs.deprn_adjustment_amount
3254: , bs.expense_adjustment_amount
3255: , bs.reserve_adjustment_amount
3256: , bs.change_in_eofy_reserve
3257: from fa_books_summary bs
3258: where bs.asset_id = p_asset_hdr_rec.asset_id
3259: and bs.book_type_code = p_asset_hdr_rec.book_type_code
3260: and bs.period_counter >= c_period_counter
3261: order by bs.period_counter;

Line 3337: from fa_books_summary_mrc_v bs

3333: , deprn_adjustment_amount
3334: , bs.expense_adjustment_amount
3335: , bs.reserve_adjustment_amount
3336: , bs.change_in_eofy_reserve
3337: from fa_books_summary_mrc_v bs
3338: where bs.asset_id = p_asset_hdr_rec.asset_id
3339: and bs.book_type_code = p_asset_hdr_rec.book_type_code
3340: and bs.period_counter >= c_period_counter
3341: order by bs.period_counter;

Line 3348: from fa_books_summary

3344: CURSOR c_get_eofy_amts(c_period_counter number) IS
3345: select recoverable_cost
3346: , salvage_value
3347: , deprn_reserve
3348: from fa_books_summary
3349: where asset_id = p_asset_hdr_rec.asset_id
3350: and book_type_code = p_asset_hdr_rec.book_type_code
3351: and period_counter = c_period_counter;
3352:

Line 3357: from fa_books_summary_mrc_v

3353: CURSOR c_get_mc_eofy_amts(c_period_counter number) IS
3354: select recoverable_cost
3355: , salvage_value
3356: , deprn_reserve
3357: from fa_books_summary_mrc_v
3358: where asset_id = p_asset_hdr_rec.asset_id
3359: and book_type_code = p_asset_hdr_rec.book_type_code
3360: and period_counter = c_period_counter;
3361:

Line 3394: from fa_books_summary bs

3390: and ret.transaction_header_id_out = p_trans_rec.member_transaction_header_id;
3391:
3392: CURSOR c_check_record_exists IS
3393: select bs.period_counter
3394: from fa_books_summary bs
3395: where bs.asset_id = p_asset_hdr_rec.asset_id
3396: and bs.book_type_code = p_asset_hdr_rec.book_type_code
3397: and bs.period_counter = p_period_rec.period_counter;
3398:

Line 3401: from fa_books_summary_mrc_v bs

3397: and bs.period_counter = p_period_rec.period_counter;
3398:
3399: CURSOR c_check_mc_record_exists IS
3400: select bs.period_counter
3401: from fa_books_summary_mrc_v bs
3402: where bs.asset_id = p_asset_hdr_rec.asset_id
3403: and bs.book_type_code = p_asset_hdr_rec.book_type_code
3404: and bs.period_counter = p_period_rec.period_counter;
3405:

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

3431: -- the period where trx date
3432: -- falls into
3433:
3434: l_ind BINARY_INTEGER; -- Used to find delta amounts for each period
3435: l_temp_ind BINARY_INTEGER; -- Indicate where to start updating FA_BOOKS_SUMMARY
3436: l_old_reserve NUMBER;
3437:
3438: --
3439: -- Tables to store member delta information

Line 3564: from fa_books_summary

3560: l_chk_bs_row_exists VARCHAR2(1);
3561:
3562: CURSOR c_chk_bs_row_exists IS
3563: select 'Y'
3564: from fa_books_summary
3565: where book_type_code = p_asset_hdr_rec.book_type_code
3566: and group_asset_id = p_asset_hdr_rec.asset_id
3567: and asset_id <> group_asset_id
3568: and period_counter = l_recalc_start_period_counter - 1;

Line 3572: from fa_books_summary

3568: and period_counter = l_recalc_start_period_counter - 1;
3569:
3570: CURSOR c_get_mem_bs_row IS
3571: select ytd_deprn,deprn_reserve,bonus_ytd_deprn,bonus_deprn_reserve,eofy_reserve
3572: from fa_books_summary
3573: where book_type_code = p_asset_hdr_rec.book_type_code
3574: and asset_id = p_reclassed_asset_id
3575: and group_asset_id = p_asset_hdr_rec.asset_id
3576: and period_counter = l_trx_period_rec.period_counter - 1;

Line 3589: from fa_books_summary_mrc_v

3585:
3586: --+ MRCsupport
3587: CURSOR c_chk_bs_row_exists_mrc IS
3588: select 'Y'
3589: from fa_books_summary_mrc_v
3590: where book_type_code = p_asset_hdr_rec.book_type_code
3591: and group_asset_id = p_asset_hdr_rec.asset_id
3592: and asset_id <> group_asset_id
3593: and period_counter = l_recalc_start_period_counter - 1;

Line 3597: from fa_books_summary_mrc_v

3593: and period_counter = l_recalc_start_period_counter - 1;
3594:
3595: CURSOR c_get_mem_bs_row_mrc IS
3596: select ytd_deprn,deprn_reserve,bonus_ytd_deprn,bonus_deprn_reserve,eofy_reserve
3597: from fa_books_summary_mrc_v
3598: where book_type_code = p_asset_hdr_rec.book_type_code
3599: and asset_id = p_reclassed_asset_id
3600: and group_asset_id = p_asset_hdr_rec.asset_id
3601: and period_counter = l_trx_period_rec.period_counter - 1;

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

3843: -- if it is from between dpis and current, then build first row
3844: -- and apply it and then apply rest of records.
3845:
3846: -- HHIRAGA
3847: -- In case this is DESTINATION, group_asset_id in FA_BOOKS_SUMMARY must be updated before starting to
3848: -- processing
3849:
3850: if (p_reclass_src_dest = 'DESTINATION') and
3851: nvl(px_asset_fin_rec_new.tracking_method,'NULL') = 'ALLOCATE' then

Line 3874: update fa_books_summary

3870:
3871: -- Query YTD and Reserve from FA_DEPRN_SUMMARY for addition
3872: if p_mrc_sob_type_Code <> 'R' then
3873:
3874: update fa_books_summary
3875: set group_Asset_id = p_asset_hdr_rec.asset_id
3876: where asset_id=p_reclassed_asset_id
3877: and period_counter >= l_trx_period_rec.period_counter;
3878:

Line 3892: insert into fa_books_summary(book_type_code,

3888: g_mem_deprn_reserve := nvl(l_mem_deprn_reserve_addition,0);
3889: g_mem_eofy_reserve := g_mem_deprn_reserve - g_mem_ytd_deprn;
3890: end if;
3891:
3892: insert into fa_books_summary(book_type_code,
3893: asset_id,
3894: group_asset_id,
3895: period_counter,
3896: cost,

Line 3927: update fa_books_summary_mrc_v

3923: p_trans_rec.who_info.last_update_date,
3924: p_trans_rec.who_info.last_updated_by);
3925: else -- Reporting
3926:
3927: update fa_books_summary_mrc_v
3928: set group_Asset_id = p_asset_hdr_rec.asset_id
3929: where asset_id=p_reclassed_asset_id
3930: and period_counter >= l_trx_period_rec.period_counter;
3931:

Line 3945: insert into fa_books_summary_mrc_v(book_type_code,

3941: g_mem_deprn_reserve := nvl(l_mem_deprn_reserve_addition,0);
3942: g_mem_eofy_reserve := g_mem_deprn_reserve - g_mem_ytd_deprn;
3943: end if;
3944:
3945: insert into fa_books_summary_mrc_v(book_type_code,
3946: asset_id,
3947: group_asset_id,
3948: period_counter,
3949: cost,

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

4168: This part of code will be removed by adding new column change_in_eofy_reserve
4169: *****************
4170: --
4171: -- Setting period counter which is used to determine from which period
4172: -- is fa_books_summary records needed to be updated.
4173: -- If there is eofy_reserve in fin_rec_adj, need to get record from
4174: -- previous eofy record to reflect the amount and recalculate.
4175: --
4176: --tk_util.debug('p_asset_fin_rec_adj.eofy_reserve: '||to_char(p_asset_fin_rec_adj.eofy_reserve));

Line 4387: -- Get eofy information from fa_books_summary_table

4383: end if;
4384:
4385: if (l_count = 1) then
4386: --
4387: -- Get eofy information from fa_books_summary_table
4388: --
4389: if (p_mrc_sob_type_code = 'R') then
4390: OPEN c_get_mc_eofy_amts(fa_amort_pvt.t_period_counter(1) - fa_amort_pvt.t_period_num(1));
4391: FETCH c_get_mc_eofy_amts INTO l_eofy_rec_cost

Line 4419: -- Get eofy information from fa_books_summary_table

4415: end if;
4416:
4417: else
4418: --
4419: -- Get eofy information from fa_books_summary_table
4420: --
4421: if (p_mrc_sob_type_code = 'R') then
4422: OPEN c_get_mc_eofy_amts(fa_amort_pvt.t_period_counter(2) - fa_amort_pvt.t_period_num(2));
4423: FETCH c_get_mc_eofy_amts INTO l_eofy_rec_cost

Line 4695: -- Update FA_BOOKS_SUMMARY

4691: );
4692: end loop;
4693: */
4694: --
4695: -- Update FA_BOOKS_SUMMARY
4696: --
4697:
4698: -- *********************** --
4699: -- Main Loop Starts Here --

Line 6550: -- Update FA_BOOKS_SUMMARY

6546: -- End of HHIRAGA
6547:
6548: if (p_update_books_summary) then
6549: --
6550: -- Update FA_BOOKS_SUMMARY
6551: --
6552: --tk_util.debug('period# : cost: chcost: msal: exp: ytd: rsv: rsv');
6553: --tk_util.debug('period# : cost: adjcost: exp: eofy: rsvaj: rsv: dlmt: arec');
6554: /*

Line 6577: UPDATE FA_BOOKS_SUMMARY_MRC_V

6573: end loop;
6574: */
6575: if (p_mrc_sob_type_code = 'R') then
6576: FORALL i in l_temp_ind..fa_amort_pvt.t_cost.LAST
6577: UPDATE FA_BOOKS_SUMMARY_MRC_V
6578: SET RESET_ADJUSTED_COST_FLAG = fa_amort_pvt.t_reset_adjusted_cost_flag(i)
6579: , CHANGE_IN_COST = fa_amort_pvt.t_change_in_cost(i)
6580: , CHANGE_IN_CIP_COST = fa_amort_pvt.t_change_in_cip_cost(i)
6581: , COST = fa_amort_pvt.t_cost(i)

Line 6653: UPDATE FA_BOOKS_SUMMARY

6649: AND PERIOD_COUNTER = fa_amort_pvt.t_period_counter(i);
6650:
6651: else
6652: FORALL i in l_temp_ind..fa_amort_pvt.t_cost.LAST
6653: UPDATE FA_BOOKS_SUMMARY
6654: SET RESET_ADJUSTED_COST_FLAG = fa_amort_pvt.t_reset_adjusted_cost_flag(i)
6655: , CHANGE_IN_COST = fa_amort_pvt.t_change_in_cost(i)
6656: , CHANGE_IN_CIP_COST = fa_amort_pvt.t_change_in_cip_cost(i)
6657: , COST = fa_amort_pvt.t_cost(i)

Line 7048: from fa_books inbk

7044:
7045: -- Bug4958977: Adding following cursor and 2 new variables
7046: CURSOR c_check_dpis_change is
7047: select inbk.transaction_header_id_in
7048: from fa_books inbk
7049: , fa_books outbk
7050: where inbk.transaction_header_id_in = px_trans_rec.member_transaction_header_id
7051: and outbk.asset_id = inbk.asset_id
7052: and outbk.book_type_code = p_asset_hdr_rec.book_type_code

Line 7049: , fa_books outbk

7045: -- Bug4958977: Adding following cursor and 2 new variables
7046: CURSOR c_check_dpis_change is
7047: select inbk.transaction_header_id_in
7048: from fa_books inbk
7049: , fa_books outbk
7050: where inbk.transaction_header_id_in = px_trans_rec.member_transaction_header_id
7051: and outbk.asset_id = inbk.asset_id
7052: and outbk.book_type_code = p_asset_hdr_rec.book_type_code
7053: and outbk.transaction_header_id_out = px_trans_rec.member_transaction_header_id

Line 7301: -- No Need to Maintain FA_BOOKS_SUMMARY Table

7297: l_call_bs := FALSE;
7298: end if;
7299:
7300: if (not l_call_bs) then
7301: -- No Need to Maintain FA_BOOKS_SUMMARY Table
7302: return true;
7303: end if;
7304: end if;
7305:

Line 8173: from FA_BOOKS bk

8169:
8170:
8171: CURSOR c_cur_eofy_reserve IS
8172: select nvl(bk.eofy_reserve,0)
8173: from FA_BOOKS bk
8174: where asset_id = p_asset_hdr_rec.asset_id
8175: and book_type_code = p_asset_hdr_rec.book_type_code
8176: and transaction_header_id_out is null;
8177:

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

8197: if p_trans_rec_cur.transaction_header_id = p_trans_rec.transaction_header_id
8198: and p_trans_rec.transaction_date_entered between
8199: p_period_rec.calendar_period_open_date and p_period_rec.calendar_period_close_date
8200: then
8201: -- At current open period's transaction, get eofy_reserve from FA_BOOKS.
8202:
8203: x_transaction_header_id := to_number(null);
8204: x_transaction_date_entered := null;
8205: x_date_effective := null;

Line 8409: fa_books inbk,

8405: , decode(p_reclass_src_dest, 'SOURCE', -1, 1) * sum(nvl(inbk.allowed_deprn_limit_amount, 0) -
8406: nvl(outbk.allowed_deprn_limit_amount, 0))
8407: , decode(p_reclass_src_dest, 'SOURCE', -1, 1) * sum(nvl(inbk.cip_cost, 0) - nvl(outbk.cip_cost, 0))
8408: from fa_transaction_headers th,
8409: fa_books inbk,
8410: fa_books outbk
8411: where inbk.asset_id = p_asset_hdr_rec.asset_id
8412: and inbk.book_type_code = p_asset_hdr_rec.book_type_code
8413: and outbk.asset_id(+) = p_asset_hdr_rec.asset_id

Line 8410: fa_books outbk

8406: nvl(outbk.allowed_deprn_limit_amount, 0))
8407: , decode(p_reclass_src_dest, 'SOURCE', -1, 1) * sum(nvl(inbk.cip_cost, 0) - nvl(outbk.cip_cost, 0))
8408: from fa_transaction_headers th,
8409: fa_books inbk,
8410: fa_books outbk
8411: where inbk.asset_id = p_asset_hdr_rec.asset_id
8412: and inbk.book_type_code = p_asset_hdr_rec.book_type_code
8413: and outbk.asset_id(+) = p_asset_hdr_rec.asset_id
8414: and outbk.book_type_code(+) = p_asset_hdr_rec.book_type_code

Line 8459: fa_books_mrc_v inbk,

8455: , decode(p_reclass_src_dest, 'SOURCE', -1, 1) * sum(nvl(inbk.allowed_deprn_limit_amount, 0) -
8456: nvl(outbk.allowed_deprn_limit_amount, 0))
8457: , decode(p_reclass_src_dest, 'SOURCE', -1, 1) * sum(nvl(inbk.cip_cost, 0) - nvl(outbk.cip_cost, 0))
8458: from fa_transaction_headers th,
8459: fa_books_mrc_v inbk,
8460: fa_books_mrc_v outbk
8461: where inbk.asset_id = p_asset_hdr_rec.asset_id
8462: and inbk.book_type_code = p_asset_hdr_rec.book_type_code
8463: and outbk.asset_id(+) = p_asset_hdr_rec.asset_id

Line 8460: fa_books_mrc_v outbk

8456: nvl(outbk.allowed_deprn_limit_amount, 0))
8457: , decode(p_reclass_src_dest, 'SOURCE', -1, 1) * sum(nvl(inbk.cip_cost, 0) - nvl(outbk.cip_cost, 0))
8458: from fa_transaction_headers th,
8459: fa_books_mrc_v inbk,
8460: fa_books_mrc_v outbk
8461: where inbk.asset_id = p_asset_hdr_rec.asset_id
8462: and inbk.book_type_code = p_asset_hdr_rec.book_type_code
8463: and outbk.asset_id(+) = p_asset_hdr_rec.asset_id
8464: and outbk.book_type_code(+) = p_asset_hdr_rec.book_type_code

Line 8681: from fa_books

8677: , global_attribute18
8678: , global_attribute19
8679: , global_attribute20
8680: , global_attribute_category
8681: from fa_books
8682: where asset_id = p_asset_hdr_rec.asset_id
8683: and book_type_code = p_asset_hdr_rec.book_type_code
8684: and (transaction_header_id_out = p_trans_rec.transaction_header_id
8685: or (transaction_header_id_in < p_trans_rec.transaction_header_id and

Line 8794: from fa_books

8790: , global_attribute18
8791: , global_attribute19
8792: , global_attribute20
8793: , global_attribute_category
8794: from fa_books
8795: where asset_id = p_asset_hdr_rec.asset_id
8796: and book_type_code = p_asset_hdr_rec.book_type_code
8797: and (transaction_header_id_out = p_init_transaction_header_id
8798: or (p_init_transaction_header_id > transaction_header_id_in and

Line 8907: from fa_books_mrc_v

8903: , global_attribute18
8904: , global_attribute19
8905: , global_attribute20
8906: , global_attribute_category
8907: from fa_books_mrc_v
8908: where asset_id = p_asset_hdr_rec.asset_id
8909: and book_type_code = p_asset_hdr_rec.book_type_code
8910: and (transaction_header_id_out = p_trans_rec.transaction_header_id
8911: or (transaction_header_id_in < p_trans_rec.transaction_header_id and

Line 9019: from fa_books_mrc_v

9015: , global_attribute18
9016: , global_attribute19
9017: , global_attribute20
9018: , global_attribute_category
9019: from fa_books_mrc_v
9020: where asset_id = p_asset_hdr_rec.asset_id
9021: and book_type_code = p_asset_hdr_rec.book_type_code
9022: and (transaction_header_id_out = p_init_transaction_header_id
9023: or (p_init_transaction_header_id > transaction_header_id_in and

Line 9218: from fa_books inbk,

9214: , inbk.global_attribute18
9215: , inbk.global_attribute19
9216: , inbk.global_attribute20
9217: , inbk.global_attribute_category
9218: from fa_books inbk,
9219: fa_books outbk
9220: where inbk.asset_id = c_asset_id
9221: and inbk.asset_id = outbk.asset_id(+)
9222: and inbk.book_type_code = p_asset_hdr_rec.book_type_code

Line 9219: fa_books outbk

9215: , inbk.global_attribute19
9216: , inbk.global_attribute20
9217: , inbk.global_attribute_category
9218: from fa_books inbk,
9219: fa_books outbk
9220: where inbk.asset_id = c_asset_id
9221: and inbk.asset_id = outbk.asset_id(+)
9222: and inbk.book_type_code = p_asset_hdr_rec.book_type_code
9223: and inbk.book_type_code = outbk.book_type_code(+)

Line 9414: from fa_books_mrc_v inbk,

9410: , inbk.global_attribute18
9411: , inbk.global_attribute19
9412: , inbk.global_attribute20
9413: , inbk.global_attribute_category
9414: from fa_books_mrc_v inbk,
9415: fa_books_mrc_v outbk
9416: where inbk.asset_id = c_asset_id
9417: and inbk.asset_id = outbk.asset_id(+)
9418: and inbk.book_type_code = p_asset_hdr_rec.book_type_code

Line 9415: fa_books_mrc_v outbk

9411: , inbk.global_attribute19
9412: , inbk.global_attribute20
9413: , inbk.global_attribute_category
9414: from fa_books_mrc_v inbk,
9415: fa_books_mrc_v outbk
9416: where inbk.asset_id = c_asset_id
9417: and inbk.asset_id = outbk.asset_id(+)
9418: and inbk.book_type_code = p_asset_hdr_rec.book_type_code
9419: and inbk.book_type_code = outbk.book_type_code(+)

Line 9577: from fa_books inbk,

9573: , inbk.global_attribute18
9574: , inbk.global_attribute19
9575: , inbk.global_attribute20
9576: , inbk.global_attribute_category
9577: from fa_books inbk,
9578: fa_books outbk
9579: where inbk.asset_id = c_asset_id
9580: and inbk.asset_id = outbk.asset_id(+)
9581: and inbk.book_type_code = p_asset_hdr_rec.book_type_code

Line 9578: fa_books outbk

9574: , inbk.global_attribute19
9575: , inbk.global_attribute20
9576: , inbk.global_attribute_category
9577: from fa_books inbk,
9578: fa_books outbk
9579: where inbk.asset_id = c_asset_id
9580: and inbk.asset_id = outbk.asset_id(+)
9581: and inbk.book_type_code = p_asset_hdr_rec.book_type_code
9582: and inbk.book_type_code = outbk.book_type_code(+)

Line 9741: from fa_books_mrc_v inbk,

9737: , inbk.global_attribute18
9738: , inbk.global_attribute19
9739: , inbk.global_attribute20
9740: , inbk.global_attribute_category
9741: from fa_books_mrc_v inbk,
9742: fa_books_mrc_v outbk
9743: where inbk.asset_id = c_asset_id
9744: and inbk.asset_id = outbk.asset_id(+)
9745: and inbk.book_type_code = p_asset_hdr_rec.book_type_code

Line 9742: fa_books_mrc_v outbk

9738: , inbk.global_attribute19
9739: , inbk.global_attribute20
9740: , inbk.global_attribute_category
9741: from fa_books_mrc_v inbk,
9742: fa_books_mrc_v outbk
9743: where inbk.asset_id = c_asset_id
9744: and inbk.asset_id = outbk.asset_id(+)
9745: and inbk.book_type_code = p_asset_hdr_rec.book_type_code
9746: and inbk.book_type_code = outbk.book_type_code(+)

Line 11407: fa_books bk

11403: th.trx_reference_id trx_reference_id,
11404: th.invoice_transaction_id,
11405: '1st SELECT in c_get_ths_adj'
11406: from fa_transaction_headers th,
11407: fa_books bk
11408: , fa_books outbk
11409: , fa_deprn_summary ds
11410: where th.asset_id = p_asset_hdr_rec.asset_id
11411: and th.book_type_code = p_asset_hdr_rec.book_type_code

Line 11408: , fa_books outbk

11404: th.invoice_transaction_id,
11405: '1st SELECT in c_get_ths_adj'
11406: from fa_transaction_headers th,
11407: fa_books bk
11408: , fa_books outbk
11409: , fa_deprn_summary ds
11410: where th.asset_id = p_asset_hdr_rec.asset_id
11411: and th.book_type_code = p_asset_hdr_rec.book_type_code
11412: and bk.asset_id = p_asset_hdr_rec.asset_id

Line 11527: from fa_books bk

11523: p_trans_rec.member_transaction_header_id member_transaction_header_id,
11524: p_trans_rec.trx_reference_id trx_reference_id,
11525: to_number(null), -- invoice_transaction_id
11526: '3nd SELECT in c_get_ths_adj'
11527: from fa_books bk
11528: where bk.asset_id = p_asset_hdr_rec.asset_id
11529: and bk.book_type_code = p_asset_hdr_rec.book_type_code
11530: and bk.transaction_header_id_out is null
11531: and p_trans_rec.transaction_type_code

Line 11558: fa_books bk

11554: and th.date_effective > c_date_effective
11555: and (p_asset_type_rec.asset_type <> G_ASSET_TYPE_GROUP or
11556: not exists (select 'Y'
11557: from fa_transaction_headers mth,
11558: fa_books bk
11559: where mth.transaction_header_id = th.member_transaction_header_id
11560: and mth.book_type_code = p_asset_hdr_rec.book_type_code
11561: and bk.asset_id = mth.asset_id
11562: and bk.book_type_code = p_asset_hdr_rec.book_type_code

Line 11579: fa_books bk

11575: and p_trans_rec.who_info.creation_date = c_date_effective
11576: and (p_asset_type_rec.asset_type <> G_ASSET_TYPE_GROUP or
11577: not exists (select 'Y'
11578: from fa_transaction_headers mth,
11579: fa_books bk
11580: where mth.transaction_header_id = p_trans_rec.member_transaction_header_id
11581: and mth.book_type_code = p_asset_hdr_rec.book_type_code
11582: and bk.asset_id = mth.asset_id
11583: and bk.book_type_code = p_asset_hdr_rec.book_type_code

Line 11739: fa_books bk

11735: where asset_id = p_asset_hdr_rec.asset_id
11736: and book_type_code = p_asset_hdr_rec.book_type_code
11737: and not exists (select 'Y'
11738: from fa_transaction_headers mth,
11739: fa_books bk
11740: where mth.transaction_header_id = th.member_transaction_header_id
11741: and mth.book_type_code = p_asset_hdr_rec.book_type_code
11742: and bk.asset_id = mth.asset_id
11743: and bk.book_type_code = p_asset_hdr_rec.book_type_code

Line 11758: fa_books bk

11754: p_trans_rec.transaction_type_code transaction_type_code
11755: from dual
11756: where not exists (select 'Y'
11757: from fa_transaction_headers mth,
11758: fa_books bk
11759: where mth.transaction_header_id = p_trans_rec.member_transaction_header_id
11760: and mth.book_type_code = p_asset_hdr_rec.book_type_code
11761: and bk.asset_id = mth.asset_id
11762: and bk.book_type_code = p_asset_hdr_rec.book_type_code

Line 11779: fa_books gbk

11775: CURSOR c_get_init_trx2 (c_transaction_header_id number) IS
11776: select outgth.transaction_header_id
11777: from fa_transaction_headers outgth,
11778: fa_transaction_headers ingth,
11779: fa_books gbk
11780: where outgth.asset_id = p_asset_hdr_rec.asset_id
11781: and outgth.book_type_code = p_asset_hdr_rec.book_type_code
11782: and outgth.transaction_header_id <= c_transaction_header_id
11783: and ingth.asset_id = p_asset_hdr_rec.asset_id

Line 11789: fa_books bk

11785: and gbk.transaction_header_id_out = outgth.transaction_header_id
11786: and gbk.transaction_header_id_in = ingth.transaction_header_id
11787: and not exists (select 1
11788: from fa_transaction_headers mth,
11789: fa_books bk
11790: where mth.transaction_header_id = ingth.member_transaction_header_id
11791: and mth.asset_id = bk.asset_id
11792: and bk.book_type_code = p_asset_hdr_rec.book_type_code
11793: and bk.transaction_header_id_out is null

Line 11822: , fa_books bk

11818: , th.transaction_date_entered
11819: , th.date_effective
11820: , th.transaction_type_code
11821: from fa_transaction_headers th
11822: , fa_books bk
11823: where bk.transaction_header_id_out < c_thid
11824: and bk.book_type_code = p_asset_hdr_rec.book_type_code
11825: and th.book_type_code = p_asset_hdr_rec.book_type_code
11826: and th.asset_id = p_asset_hdr_rec.asset_id

Line 11899: -- to find starting fa_books record

11895: l_asset_fin_rec_new FA_API_TYPES.asset_fin_rec_type;
11896: l_asset_retire_rec FA_API_TYPES.asset_retire_rec_type;
11897:
11898: l_least_thid number(15); -- Stored least transaction_header_id
11899: -- to find starting fa_books record
11900: l_member_asset_id number(15) := to_number(null); -- Store member asset id
11901: l_member_trx_key varchar2(2); -- member transaction key
11902: l_member_hdr_rec FA_API_TYPES.asset_hdr_rec_type;
11903: l_next_period_rec FA_API_TYPES.period_rec_type;

Line 13057: -- Construct new fa_books row.

13053: end if;
13054: end if; -- l_trans_rec.transaction_type_code in (G_TRX_TYPE_FUL_RET, G_TRX_TYPE_PAR_RET)
13055:
13056: --
13057: -- Construct new fa_books row.
13058: -- For first transaction, also get initial fa_books row.
13059: if (l_process_this_trx) or
13060: ((i = 1) and (l_row_count < l_limit)) then
13061:

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

13054: end if; -- l_trans_rec.transaction_type_code in (G_TRX_TYPE_FUL_RET, G_TRX_TYPE_PAR_RET)
13055:
13056: --
13057: -- Construct new fa_books row.
13058: -- For first transaction, also get initial fa_books row.
13059: if (l_process_this_trx) or
13060: ((i = 1) and (l_row_count < l_limit)) then
13061:
13062: if not GetFinRec(p_trans_rec => l_trans_rec,

Line 13737: from fa_books bk

13733: -- Bug 5726160
13734: declare
13735: cursor c_depreciate_flag is
13736: select bk.depreciate_flag
13737: from fa_books bk
13738: ,fa_deprn_periods dp
13739: where bk.asset_id = p_asset_hdr_rec.asset_id
13740: and bk.book_type_code = p_asset_hdr_rec.book_type_code
13741: and bk.date_effective <= nvl(dp.period_close_date, sysdate)

Line 14637: from fa_books_mrc_v bk

14633: l_asset_fin_rec.rate_adjustment_factor,
14634: l_asset_fin_rec.prorate_date,
14635: l_asset_fin_rec.deprn_start_date,
14636: l_asset_fin_rec.date_placed_in_service
14637: from fa_books_mrc_v bk
14638: where bk.book_type_code = p_asset_hdr_rec.book_type_code
14639: and bk.asset_id = p_asset_hdr_rec.asset_id
14640: and bk.transaction_header_id_in = p_add_txn_id;
14641: else

Line 14676: from fa_books bk

14672: l_asset_fin_rec.rate_adjustment_factor,
14673: l_asset_fin_rec.prorate_date,
14674: l_asset_fin_rec.deprn_start_date,
14675: l_asset_fin_rec.date_placed_in_service
14676: from fa_books bk
14677: where bk.book_type_code = p_asset_hdr_rec.book_type_code
14678: and bk.asset_id = p_asset_hdr_rec.asset_id
14679: and bk.transaction_header_id_in = p_add_txn_id;
14680: end if;

Line 15689: from fa_books_summary

15685: l_chk_bs_row_exists VARCHAR2(1);
15686:
15687: CURSOR c_chk_bs_row_exists IS
15688: select 'Y'
15689: from fa_books_summary
15690: where book_type_code = p_asset_hdr_rec.book_type_code
15691: and group_asset_id = p_asset_hdr_rec.asset_id
15692: and asset_id <> group_asset_id
15693: and period_counter = l_recalc_start_period_counter - 1;

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

16132: end if;
16133:
16134: --
16135: -- Purpose of calling CurrentPeriodAdj is to reflect the trx to
16136: -- FA_BOOKS_SUMMARY. Not for calculating a catch-up.
16137: -- Call CurrentPeriodAdj if:
16138: -- This is group asset.
16139: -- This is current period trx
16140: -- This is not member ret/rein, group reclass or group reclas with enter.

Line 16219: from fa_books inbk

16215: , inbk.cip_cost
16216: , inbk.salvage_value
16217: , inbk.allowed_deprn_limit_amount
16218: , bs.period_counter
16219: from fa_books inbk
16220: , fa_books outbk
16221: , fa_transaction_headers inth
16222: , fa_transaction_headers outth
16223: , fa_books_summary bs

Line 16220: , fa_books outbk

16216: , inbk.salvage_value
16217: , inbk.allowed_deprn_limit_amount
16218: , bs.period_counter
16219: from fa_books inbk
16220: , fa_books outbk
16221: , fa_transaction_headers inth
16222: , fa_transaction_headers outth
16223: , fa_books_summary bs
16224: where inbk.transaction_header_id_in = p_transaction_header_id

Line 16223: , fa_books_summary bs

16219: from fa_books inbk
16220: , fa_books outbk
16221: , fa_transaction_headers inth
16222: , fa_transaction_headers outth
16223: , fa_books_summary bs
16224: where inbk.transaction_header_id_in = p_transaction_header_id
16225: and outbk.asset_id = inbk.asset_id
16226: and outbk.book_type_code = p_book_type_code
16227: and outbk.transaction_header_id_out = p_transaction_header_id

Line 16286: from fa_books

16282: l_calling_fn varchar2(100) := 'FA_AMORT_PVT.check_member_existence';
16283:
16284: CURSOR c_mem_exists IS
16285: select transaction_header_id_in
16286: from fa_books
16287: where group_asset_id = p_asset_hdr_rec.asset_id
16288: and book_type_code = p_asset_hdr_rec.book_type_code
16289: and transaction_header_id_out is null;
16290: