DBA Data[Home] [Help]

APPS.FA_TRACK_MEMBER_PVT dependencies on FA_BOOKS

Line 196: -- or FA_BOOKS following P_mode

192: nvl(P_mode,'DEPRECIATION') = 'GROUP ADJUSTMENT' then
193:
194: -- This is a case when this program is called from Group Adjustments.
195: -- So allocated amount will be inserted/updated into FA_ADJUSTMENTS or FA_DEPRN_SUMMARY/DETAIL
196: -- or FA_BOOKS following P_mode
197:
198: if not ins_dd_adj(P_book_type_Code => P_book_type_code,
199: P_group_asset_id => P_group_asset_id,
200: P_period_counter => h_period_counter,

Line 380: from fa_books bk,

376: nvl(ds.deprn_reserve,0) deprn_reserve,
377: nvl(ds.ytd_deprn,0) ytd_deprn,
378: nvl(ds.bonus_deprn_reserve,0) bonus_deprn_reserve,
379: nvl(ds.bonus_ytd_deprn,0) bonus_ytd_deprn
380: from fa_books bk,
381: fa_deprn_summary ds,
382: fa_additions_b ad
383: where bk.group_asset_id = h_group_asset_id
384: and bk.book_type_code = h_book_type_code

Line 463: from fa_books bk,

459: cursor ALL_MEMBERS_TOTAL is
460: select sum(bk.cost),
461: decode(h_excl_sv,'N',sum(bk.adjusted_cost),sum(bk.adjusted_cost+bk.salvage_value)),
462: sum(bk.recoverable_cost)
463: from fa_books bk,
464: fa_additions_b ad
465: where bk.group_asset_id = h_group_asset_id
466: and bk.date_ineffective is null
467: and bk.depreciate_flag = 'YES'

Line 491: from fa_books bk,

487: cursor MEMBERS_EX_RETIRED_TOTAL is
488: select sum(bk.cost),
489: decode(h_excl_sv,'N',sum(bk.adjusted_cost),sum(bk.adjusted_cost+bk.salvage_value)),
490: sum(bk.recoverable_cost)
491: from fa_books bk,
492: fa_additions_b ad
493: where bk.group_asset_id = h_group_asset_id
494: and bk.date_ineffective is null
495: and bk.period_counter_fully_retired is null

Line 521: from fa_books bk,

517: cursor MEMBERS_EX_RESERVED_TOTAL is
518: select sum(bk.cost),
519: decode(h_excl_sv,'N',sum(bk.adjusted_cost),sum(bk.adjusted_cost+bk.salvage_value)),
520: sum(bk.recoverable_cost)
521: from fa_books bk,
522: fa_additions_b ad
523: where bk.group_asset_id = h_group_asset_id
524: and bk.date_ineffective is null
525: and bk.period_counter_fully_reserved is null

Line 551: from fa_books bk,

547: cursor MEMBER_EX_BOTH_TOTAL is
548: select sum(bk.cost),
549: decode(h_excl_sv,'N',sum(bk.adjusted_cost),sum(bk.adjusted_cost+bk.salvage_value)),
550: sum(bk.recoverable_cost)
551: from fa_books bk,
552: fa_additions_b ad
553: where bk.group_asset_id = h_group_asset_id
554: and bk.date_ineffective is null
555: and bk.period_counter_fully_retired is null

Line 604: fa_books bk,

600: ds.ytd_deprn,
601: ds.bonus_deprn_reserve,
602: ds.bonus_ytd_deprn
603: from fa_track_members tr,
604: fa_books bk,
605: fa_deprn_summary ds,
606: fa_deprn_periods dp,
607: fa_additions_b ad
608: where tr.group_asset_id = h_group_asset_id

Line 668: from fa_books bk

664: --* Cursor for Group Adjusted Cost or Recoverable Cost
665: cursor GROUP_BASIS is
666: select decode(h_excl_sv,'N',bk.adjusted_cost,bk.adjusted_cost+bk.salvage_value) adjusted_cost,
667: bk.recoverable_cost recoverable_cost
668: from fa_books bk
669: where bk.book_type_code=h_book_type_code
670: and bk.asset_id = h_group_asset_id
671: and bk.date_ineffective is null;
672:

Line 829: , fa_books bk

825: cursor c_get_basis_rule_name is
826: select db.rule_name
827: from fa_deprn_basis_rules db
828: , fa_methods mt
829: , fa_books bk
830: where db.deprn_basis_rule_id = mt.deprn_basis_rule_id
831: and mt.method_code = bk.deprn_method_code
832: and nvl(mt.life_in_months, -99) = nvl(bk.life_in_months, -99)
833: and bk.book_type_code = h_book_type_code

Line 983: -- issue query against fa_books_summary

979: h_total_cost := 0;
980: h_total_adjusted_cost := 0;
981: h_total_recoverable_cost := 0;
982:
983: -- issue query against fa_books_summary
984: For i IN 1 .. p_track_member_table.COUNT LOOP
985:
986: if p_track_member_table(i).group_asset_id = h_group_asset_id and
987: p_track_member_table(i).period_counter = h_period_counter and

Line 1554: update fa_books -- ENERGY

1550: (mem.asset_id is not null) and -- ENERGY
1551: (nvl(l_track_member_out.allocated_deprn_amount, 0) <> 0) and -- ENERGY
1552: (nvl(P_mode,'DEPRECIATION') = 'UNPLANNED') then -- ENERGY
1553: -- ENERGY
1554: update fa_books -- ENERGY
1555: set adjusted_cost = adjusted_cost - nvl(l_track_member_out.allocated_deprn_amount, 0) -- ENERGY
1556: where transaction_header_id_out is null -- ENERGY
1557: and asset_id = mem.asset_id -- ENERGY
1558: and book_type_code = h_book_type_code; -- ENERGY

Line 1703: update fa_books_mrc_v -- ENERGY

1699: (mem.asset_id is not null) and -- ENERGY
1700: (nvl(l_track_member_out.allocated_deprn_amount, 0) <> 0) and -- ENERGY
1701: (nvl(P_mode,'DEPRECIATION') = 'UNPLANNED') then -- ENERGY
1702:
1703: update fa_books_mrc_v -- ENERGY
1704: set adjusted_cost = adjusted_cost - nvl(l_track_member_out.allocated_deprn_amount, 0) -- ENERGY
1705: where transaction_header_id_out is null -- ENERGY
1706: and asset_id = mem.asset_id -- ENERGY
1707: and book_type_code = h_book_type_code; -- ENERGY

Line 2846: UPDATE FA_BOOKS_SUMMARY

2842:
2843: if h_unplanned_expense <> 0 then
2844:
2845: if p_mrc_sob_type_code <> 'R' then
2846: UPDATE FA_BOOKS_SUMMARY
2847: SET DEPRN_AMOUNT = h_unplanned_expense + DEPRN_AMOUNT,
2848: YTD_DEPRN = h_unplanned_expense + YTD_DEPRN
2849: WHERE BOOK_TYPE_CODE = h_book_type_code
2850: AND PERIOD_COUNTER = h_period_counter

Line 2853: UPDATE FA_BOOKS_SUMMARY_MRC_V

2849: WHERE BOOK_TYPE_CODE = h_book_type_code
2850: AND PERIOD_COUNTER = h_period_counter
2851: AND ASSET_ID = h_unplanned_member_asset;
2852: else
2853: UPDATE FA_BOOKS_SUMMARY_MRC_V
2854: SET DEPRN_AMOUNT = h_unplanned_expense + DEPRN_AMOUNT,
2855: YTD_DEPRN = h_unplanned_expense + YTD_DEPRN
2856: WHERE BOOK_TYPE_CODE = h_book_type_code
2857: AND PERIOD_COUNTER = h_period_counter

Line 3799: from fa_books bk,

3795: temp.eofy_recoverable_cost temp_eofy_recoverable_cost,
3796: temp.eop_recoverable_cost temp_eop_recoverable_cost,
3797: temp.eofy_salvage_value temp_eofy_salvage_value,
3798: temp.eop_salvage_value temp_eop_salvage_value
3799: from fa_books bk,
3800: fa_deprn_summary ds,
3801: fa_track_members temp
3802: where bk.book_type_code = h_book_type_code
3803: and bk.group_asset_id = h_group_asset_id

Line 3981: from fa_books new_bk,

3977: new_bk.salvage_type,
3978: decode(new_bk.salvage_type,'PCT',new_bk.percent_salvage_value),
3979: new_bk.deprn_limit_type,
3980: decode(new_bk.deprn_limit_type,'PCT',new_bk.allowed_deprn_limit)
3981: from fa_books new_bk,
3982: fa_books old_bk
3983: where new_bk.book_type_code = p_group_rule_in.book_type_code
3984: and new_bk.asset_id = h_member_asset_id
3985: and new_bk.transaction_header_id_in = h_adj_member_trans_header_id

Line 3982: fa_books old_bk

3978: decode(new_bk.salvage_type,'PCT',new_bk.percent_salvage_value),
3979: new_bk.deprn_limit_type,
3980: decode(new_bk.deprn_limit_type,'PCT',new_bk.allowed_deprn_limit)
3981: from fa_books new_bk,
3982: fa_books old_bk
3983: where new_bk.book_type_code = p_group_rule_in.book_type_code
3984: and new_bk.asset_id = h_member_asset_id
3985: and new_bk.transaction_header_id_in = h_adj_member_trans_header_id
3986: and old_bk.book_type_code = new_bk.book_type_code

Line 4169: from fa_books new_bk

4165: new_bk.salvage_type,
4166: new_bk.percent_salvage_value,
4167: new_bk.deprn_limit_type,
4168: new_bk.allowed_deprn_limit
4169: from fa_books new_bk
4170: where new_bk.book_type_code = p_group_rule_in.book_type_code
4171: and new_bk.asset_id = h_member_asset_id
4172: and new_bk.transaction_header_id_in = h_adj_member_trans_header_id;
4173:

Line 4190: from fa_books

4186: and new_bk.set_of_books_id = h_set_of_books_id;
4187:
4188: cursor GET_EXCLUDE_FULLY_RSV_FLAG is
4189: select exclude_fully_rsv_flag
4190: from fa_books
4191: where book_type_code = h_book_type_code
4192: and asset_id = h_group_asset_id
4193: and date_ineffective is null;
4194:

Line 4197: from fa_books_mrc_v

4193: and date_ineffective is null;
4194:
4195: cursor GET_EXCLUDE_FULLY_RSV_FLAG_MRC is
4196: select exclude_fully_rsv_flag
4197: from fa_books_mrc_v
4198: where book_type_code = h_book_type_code
4199: and asset_id = h_group_asset_id
4200: and date_ineffective is null;
4201:

Line 4381: -- Query old fa_books and new fa_books to calculate delta

4377: -- and nvl(h_transaction_type_code,'NULL') <> 'ADDITION'
4378: -- and nvl(h_transaction_type_code,'NULL') <> 'ADDITION/VOID' then
4379: and h_period_counter = h_trans_period_counter then -- This transaction is for this member
4380:
4381: -- Query old fa_books and new fa_books to calculate delta
4382: if p_group_rule_in.mrc_sob_type_code <> 'R' then
4383: open GET_DELTA;
4384: fetch GET_DELTA into h_adj_cost,h_adj_salvage_value,h_adj_adjusted_rec_cost,
4385: h_adj_salvage_type,h_adj_percent_salvage,

Line 4866: --* Following logic is prepared for exclude_salvage_value in FA_BOOKS is set.

4862: end if; -- allocation type
4863:
4864: end loop;
4865:
4866: --* Following logic is prepared for exclude_salvage_value in FA_BOOKS is set.
4867: -- In this case, adjusted_cost of fully reserved should be removed from adjusted_cost
4868: -- of group asset. so need to maintain the memory table adjusted cost
4869: if nvl(h_exclude_fully_rsv_flag,'N') = 'Y' and
4870: nvl(p_group_rule_in.eofy_flag,'N') = 'Y' and

Line 5088: --* Update FA_BOOKS table

5084: p_log_level_rec => p_log_level_rec)) then
5085: raise upd_deprn_err;
5086: end if;
5087:
5088: --* Update FA_BOOKS table
5089: if nvl(fa_rule_in.eofy_flag,'N') = 'Y' then
5090: h_prior_eofy_reserve := member.bk_eofy_reserve;
5091: h_new_eofy_reserve := fa_rule_in.current_total_rsv;
5092: h_eofy_adj_cost := member.adjusted_cost;

Line 5105: fa_debug_pkg.add(l_calling_fn, '++ update FA_BOOKS for ',member.member_asset_id, p_log_level_rec);

5101: h_prior_eofy_reserve := null;
5102: end if;
5103:
5104: if (p_log_level_rec.statement_level) then
5105: fa_debug_pkg.add(l_calling_fn, '++ update FA_BOOKS for ',member.member_asset_id, p_log_level_rec);
5106: fa_debug_pkg.add(l_calling_fn, 'fa_rule_out.new_adjusted_cost ',fa_rule_out.new_adjusted_cost, p_log_level_rec);
5107: fa_debug_pkg.add(l_calling_fn, 'h_eofy_adj_cost:h_eop_adj_cost:h_new_eofy_reserve ',
5108: h_eofy_adj_cost||':'||h_eop_adj_cost||':'||h_new_eofy_reserve, p_log_level_rec);
5109: end if;

Line 5111: update fa_books

5107: fa_debug_pkg.add(l_calling_fn, 'h_eofy_adj_cost:h_eop_adj_cost:h_new_eofy_reserve ',
5108: h_eofy_adj_cost||':'||h_eop_adj_cost||':'||h_new_eofy_reserve, p_log_level_rec);
5109: end if;
5110:
5111: update fa_books
5112: set adjusted_cost = fa_rule_out.new_adjusted_cost,
5113: eofy_adj_cost = h_eofy_adj_cost,
5114: eofy_reserve = h_new_eofy_reserve,
5115: eop_adj_cost = h_eop_adj_cost,

Line 5295: --* Update FA_BOOKS table

5291: p_log_level_rec => p_log_level_rec)) then
5292: raise upd_deprn_err;
5293: end if;
5294:
5295: --* Update FA_BOOKS table
5296: if nvl(fa_rule_in.eofy_flag,'N') = 'Y' then
5297: h_new_eofy_reserve := fa_rule_in.current_total_rsv;
5298: h_eofy_adj_cost := member.adjusted_cost;
5299: h_prior_eofy_reserve := member.bk_eofy_reserve;

Line 5312: fa_debug_pkg.add(l_calling_fn, '++ update FA_BOOKS for ',member.member_asset_id, p_log_level_rec);

5308: h_prior_eofy_reserve := null;
5309: end if;
5310:
5311: if (p_log_level_rec.statement_level) then
5312: fa_debug_pkg.add(l_calling_fn, '++ update FA_BOOKS for ',member.member_asset_id, p_log_level_rec);
5313: fa_debug_pkg.add(l_calling_fn, 'fa_rule_out.new_adjusted_cost ',fa_rule_out.new_adjusted_cost, p_log_level_rec);
5314: fa_debug_pkg.add(l_calling_fn, 'h_eofy_adj_cost:h_eop_adj_cost:h_new_eofy_reserve ',
5315: h_eofy_adj_cost||':'||h_eop_adj_cost||':'||h_new_eofy_reserve, p_log_level_rec);
5316: end if;

Line 5502: fa_books_pkg.deactivate_row

5498: raise ins_dd_adj_err;
5499: end if;
5500:
5501: -- terminate the row
5502: fa_books_pkg.deactivate_row
5503: (X_asset_id => p_asset_hdr_rec.asset_id,
5504: X_book_type_code => p_asset_hdr_rec.book_type_code,
5505: X_transaction_header_id_out => p_transaction_header_id,
5506: X_date_ineffective => sysdate,

Line 5523: fa_books_pkg.insert_row

5519:
5520: x_asset_fin_rec.period_counter_life_complete := x_asset_fin_rec.period_counter_fully_reserved;
5521:
5522: -- insert the row
5523: fa_books_pkg.insert_row
5524: (X_Rowid => l_rowid,
5525: X_Book_Type_Code => p_asset_hdr_rec.book_type_code,
5526: X_Asset_Id => p_asset_hdr_rec.asset_id,
5527: X_Date_Placed_In_Service => x_asset_fin_rec.date_placed_in_service,

Line 5903: from fa_books bk,

5899:
5900: -- cursor to get all members at the specified period
5901: cursor ALL_MEMBERS(h_date date) is
5902: select bk.asset_id
5903: from fa_books bk,
5904: fa_additions_b ad
5905: where bk.book_type_code = h_book_type_code
5906: and bk.group_asset_id = h_group_asset_id
5907: and bk.date_placed_in_service <= h_date

Line 5947: from fa_books bk,

5943: decode(dp1.fiscal_year,h_fiscal_year,ds.ytd_deprn,0),
5944: ds.bonus_deprn_reserve,
5945: decode(dp1.fiscal_year,h_fiscal_year,ds.bonus_ytd_deprn,0),
5946: dp1.fiscal_year
5947: from fa_books bk,
5948: fa_deprn_periods dp,
5949: fa_deprn_periods dp1,
5950: fa_deprn_summary ds,
5951: fa_additions_b ad

Line 5961: from fa_books bk1

5957: bk.transaction_header_id_out = h_last_trans_id or
5958: (bk.date_ineffective is null and
5959: bk.transaction_header_id_in <> nvl(p_transaction_header_id,-1) and
5960: not exists (select 'y'
5961: from fa_books bk1
5962: where bk1.book_type_code = bk.book_type_code
5963: and bk1.asset_id = bk.asset_id
5964: and bk1.transaction_header_id_out = nvl(p_transaction_header_id,-1))))
5965: and bk.depreciate_flag = 'YES'

Line 6012: from fa_books_mrc_v bk1

6008: bk.transaction_header_id_out = h_last_trans_id or
6009: (bk.date_ineffective is null and
6010: bk.transaction_header_id_in <> nvl(p_transaction_header_id,-1) and
6011: not exists (select 'y'
6012: from fa_books_mrc_v bk1
6013: where bk1.book_type_code = bk.book_type_code
6014: and bk1.asset_id = bk.asset_id
6015: and bk1.transaction_header_id_out = nvl(p_transaction_header_id,-1))))
6016: and bk.depreciate_flag = 'YES'

Line 6050: from fa_books bk,

6046: ds.ytd_deprn,
6047: ds.bonus_deprn_reserve,
6048: ds.bonus_ytd_deprn,
6049: dp.fiscal_year
6050: from fa_books bk,
6051: fa_deprn_periods dp,
6052: fa_deprn_summary ds,
6053: fa_additions_b ad
6054: where dp.book_type_code = h_book_type_code

Line 6116: from fa_books bk,

6112:
6113: cursor MEMBER_START_PERIOD is
6114: select bk.recoverable_cost,
6115: bk.salvage_value
6116: from fa_books bk,
6117: fa_deprn_periods dp
6118: where bk.book_type_code = h_book_type_code
6119: and bk.group_asset_id = h_member_asset_id
6120: and bk.date_effective <= nvl(dp.period_close_date,sysdate)

Line 6357: from fa_books

6353:
6354: if nvl(p_calling_fn,'OTHER') = 'TRACK_ASSETS' then -- Get group level info
6355: select deprn_method_code,life_in_months
6356: into h_method_code,h_life_in_months
6357: from fa_books
6358: where book_type_code = h_book_type_code
6359: and asset_id = h_group_asset_id
6360: and date_ineffective is null;
6361: end if;

Line 6478: fa_debug_pkg.add(l_calling_fn, 'No rows in FA_BOOKS of member asset', h_member_asset_id);

6474: h_deprn_reserve, h_ytd_deprn,
6475: h_bonus_deprn_reserve, h_bonus_ytd_deprn, h_eop_fiscal_year;
6476: if ALL_MEMBER_FOR_ADDITION%NOTFOUND then
6477: if (p_log_level_rec.statement_level) then
6478: fa_debug_pkg.add(l_calling_fn, 'No rows in FA_BOOKS of member asset', h_member_asset_id);
6479: end if;
6480: else
6481: i := i + 1;
6482: p_track_member_table(i).group_asset_id := h_group_asset_id;

Line 6739: fa_debug_pkg.add(l_calling_fn, 'No rows in FA_BOOKS(Reporting Book) of member asset', h_member_asset_id);

6735: h_deprn_reserve, h_ytd_deprn,
6736: h_bonus_deprn_reserve, h_bonus_ytd_deprn, h_eop_fiscal_year;
6737: if ALL_MEMBER_FOR_ADDITION_MRC%NOTFOUND then
6738: if (p_log_level_rec.statement_level) then
6739: fa_debug_pkg.add(l_calling_fn, 'No rows in FA_BOOKS(Reporting Book) of member asset', h_member_asset_id);
6740: end if;
6741: i := i + 1;
6742: p_track_member_table(i).group_asset_id := h_group_asset_id;
6743: p_track_member_table(i).member_asset_id := h_member_asset_id;

Line 7010: from FA_BOOKS BK_IN,

7006: BK_OUT.DEPRN_LIMIT_TYPE old_limit_type,
7007: BK_IN.ALLOWED_DEPRN_LIMIT new_deprn_limit,
7008: BK_IN.ALLOWED_DEPRN_LIMIT_AMOUNT new_deprn_limit_amount,
7009: BK_IN.DEPRECIATE_FLAG depreciate_flag
7010: from FA_BOOKS BK_IN,
7011: FA_BOOKS BK_OUT
7012: where BK_IN.book_type_code = h_book_type_code
7013: and BK_IN.asset_id = h_member_asset_id
7014: and BK_IN.transaction_header_id_in = p_transaction_header_id

Line 7011: FA_BOOKS BK_OUT

7007: BK_IN.ALLOWED_DEPRN_LIMIT new_deprn_limit,
7008: BK_IN.ALLOWED_DEPRN_LIMIT_AMOUNT new_deprn_limit_amount,
7009: BK_IN.DEPRECIATE_FLAG depreciate_flag
7010: from FA_BOOKS BK_IN,
7011: FA_BOOKS BK_OUT
7012: where BK_IN.book_type_code = h_book_type_code
7013: and BK_IN.asset_id = h_member_asset_id
7014: and BK_IN.transaction_header_id_in = p_transaction_header_id
7015: and BK_OUT.book_type_code(+) = BK_IN.book_type_code

Line 7027: from FA_BOOKS_MRC_V BK_IN,

7023: BK_OUT.DEPRN_LIMIT_TYPE old_limit_type,
7024: BK_IN.ALLOWED_DEPRN_LIMIT new_deprn_limit,
7025: BK_IN.ALLOWED_DEPRN_LIMIT_AMOUNT old_deprn_limit,
7026: BK_IN.DEPRECIATE_FLAG depreciate_flag
7027: from FA_BOOKS_MRC_V BK_IN,
7028: FA_BOOKS_MRC_V BK_OUT
7029: where BK_IN.book_type_code = h_book_type_code
7030: and BK_IN.asset_id = h_member_asset_id
7031: and BK_IN.transaction_header_id_in = p_transaction_header_id

Line 7028: FA_BOOKS_MRC_V BK_OUT

7024: BK_IN.ALLOWED_DEPRN_LIMIT new_deprn_limit,
7025: BK_IN.ALLOWED_DEPRN_LIMIT_AMOUNT old_deprn_limit,
7026: BK_IN.DEPRECIATE_FLAG depreciate_flag
7027: from FA_BOOKS_MRC_V BK_IN,
7028: FA_BOOKS_MRC_V BK_OUT
7029: where BK_IN.book_type_code = h_book_type_code
7030: and BK_IN.asset_id = h_member_asset_id
7031: and BK_IN.transaction_header_id_in = p_transaction_header_id
7032: and BK_OUT.book_type_code(+) = BK_IN.book_type_code

Line 7039: from fa_books bk,

7035:
7036: -- cursor to get all members at the specified period
7037: cursor ALL_MEMBERS_AT_AMORT(p_fiscal_year number,p_period_num number) is
7038: select distinct bk.asset_id member_asset_id, ad.asset_number
7039: from fa_books bk,
7040: fa_additions_b ad
7041: where bk.book_type_code = h_book_type_code
7042: and bk.group_asset_id = h_group_asset_id
7043: and bk.depreciate_flag = 'YES'

Line 7063: from fa_books_mrc_v bk,

7059: order by ad.asset_number asc;
7060:
7061: cursor ALL_MEMBERS_AT_AMORT_MRC(p_fiscal_year number,p_period_num number) is
7062: select distinct bk.asset_id member_asset_id, ad.asset_number
7063: from fa_books_mrc_v bk,
7064: fa_additions_b ad
7065: where bk.book_type_code = h_book_type_code
7066: and bk.group_asset_id = h_group_asset_id
7067: and bk.depreciate_flag = 'YES'

Line 7087: from fa_books BK_IN

7083: order by ad.asset_number asc;
7084:
7085: cursor RECLASS_TRANS_CHECK(p_member_asset_id number,p_thid number) is
7086: select BK_IN.group_asset_id
7087: from fa_books BK_IN
7088: where BK_IN.book_type_code = h_book_type_code
7089: and BK_IN.asset_id = p_member_asset_id
7090: and BK_IN.transaction_header_id_in = p_thid;
7091:

Line 7094: from fa_books_mrc_v BK_IN

7090: and BK_IN.transaction_header_id_in = p_thid;
7091:
7092: cursor RECLASS_TRANS_CHECK_MRC(p_member_asset_id number,p_thid number) is
7093: select BK_IN.group_asset_id
7094: from fa_books_mrc_v BK_IN
7095: where BK_IN.book_type_code = h_book_type_code
7096: and BK_IN.asset_id = p_member_asset_id
7097: and BK_IN.transaction_header_id_in = p_thid;
7098:

Line 7221: -- Query member assets from FA_BOOKS at the time of transction_date_entered

7217: raise get_member_at_start_err;
7218: end if;
7219: end if;
7220:
7221: -- Query member assets from FA_BOOKS at the time of transction_date_entered
7222:
7223: i := 0;
7224: if p_mrc_sob_type_code <> 'R' then
7225:

Line 7726: -- to update FA_BOOKS for each member assets

7722: --+=====================================================================
7723: -- Function: update_member_books
7724: --
7725: -- This function will be called from adjustment engine
7726: -- to update FA_BOOKS for each member assets
7727: -- Using stored adjusted_cost in FA_TRACK_MEMBERS,
7728: -- FA_BOOKS will be updated.
7729: --
7730: --+=====================================================================

Line 7728: -- FA_BOOKS will be updated.

7724: --
7725: -- This function will be called from adjustment engine
7726: -- to update FA_BOOKS for each member assets
7727: -- Using stored adjusted_cost in FA_TRACK_MEMBERS,
7728: -- FA_BOOKS will be updated.
7729: --
7730: --+=====================================================================
7731:
7732: FUNCTION update_member_books(p_trans_rec in FA_API_TYPES.trans_rec_type,

Line 7782: from fa_books bk

7778: -- cursor to query start period condition of all members belonged to the specified group
7779: cursor ALL_MEMBERS is
7780: select bk.asset_id,
7781: bk.group_asset_id
7782: from fa_books bk
7783: where bk.book_type_code = h_book_type_code
7784: and bk.group_asset_id = h_group_asset_id
7785: and bk.date_ineffective is null
7786: and bk.depreciate_flag = 'YES'

Line 7793: from fa_books_mrc_v bk

7789:
7790: cursor ALL_MEMBERS_MRC is
7791: select bk.asset_id,
7792: bk.group_asset_id
7793: from fa_books_mrc_v bk
7794: where bk.book_type_code = h_book_type_code
7795: and bk.group_asset_id = h_group_asset_id
7796: and bk.date_ineffective is null
7797: and bk.depreciate_flag = 'YES'

Line 7849: -- Query member assets from FA_BOOKS with current date

7845: if (p_log_level_rec.statement_level) then
7846: fa_debug_pkg.add(l_calling_fn, 'h_set_of_books_id:period_counter', h_set_of_books_id||':'||h_period_counter, p_log_level_rec);
7847: end if;
7848:
7849: -- Query member assets from FA_BOOKS with current date
7850: if p_mrc_sob_type_code <> 'R' then
7851:
7852: -- Loop for all member populated above
7853: For update_member in ALL_MEMBERS loop

Line 7893: -- Update FA_BOOKS table

7889: fa_debug_pkg.add('fa_track_member_pvt', 'adjusted cost', h_adjusted_cost, p_log_level_rec);
7890: fa_debug_pkg.add('fa_track_member_pvt', 'eofy reserve', h_eofy_reserve, p_log_level_rec);
7891: end if;
7892:
7893: -- Update FA_BOOKS table
7894: Update FA_BOOKS set adjusted_cost = h_adjusted_cost,
7895: eofy_reserve = h_eofy_reserve,
7896: last_update_date = sysdate,
7897: last_updated_by = -1

Line 7894: Update FA_BOOKS set adjusted_cost = h_adjusted_cost,

7890: fa_debug_pkg.add('fa_track_member_pvt', 'eofy reserve', h_eofy_reserve, p_log_level_rec);
7891: end if;
7892:
7893: -- Update FA_BOOKS table
7894: Update FA_BOOKS set adjusted_cost = h_adjusted_cost,
7895: eofy_reserve = h_eofy_reserve,
7896: last_update_date = sysdate,
7897: last_updated_by = -1
7898: where book_type_code = h_book_type_code

Line 7951: -- Update FA_BOOKS table

7947: fa_debug_pkg.add('fa_track_member_pvt', 'adjusted cost', h_adjusted_cost, p_log_level_rec);
7948: fa_debug_pkg.add('fa_track_member_pvt', 'eofy reserve', h_eofy_reserve, p_log_level_rec);
7949: end if;
7950:
7951: -- Update FA_BOOKS table
7952: Update FA_BOOKS_MRC_V set adjusted_cost = h_adjusted_cost,
7953: eofy_reserve = h_eofy_reserve,
7954: last_update_date = sysdate,
7955: last_updated_by = -1

Line 7952: Update FA_BOOKS_MRC_V set adjusted_cost = h_adjusted_cost,

7948: fa_debug_pkg.add('fa_track_member_pvt', 'eofy reserve', h_eofy_reserve, p_log_level_rec);
7949: end if;
7950:
7951: -- Update FA_BOOKS table
7952: Update FA_BOOKS_MRC_V set adjusted_cost = h_adjusted_cost,
7953: eofy_reserve = h_eofy_reserve,
7954: last_update_date = sysdate,
7955: last_updated_by = -1
7956: where book_type_code = h_book_type_code

Line 8341: from FA_BOOKS BK,

8337:
8338: --* Cursor to populate member assets exist at the period
8339: cursor GET_MEMBER_ASSETS(p_fiscal_year number,p_period_num number) is
8340: select distinct BK.ASSET_ID, AD.asset_number
8341: from FA_BOOKS BK,
8342: FA_ADDITIONS_B AD
8343: where BK.book_type_code = h_book_type_code
8344: and BK.group_asset_id = h_group_asset_id
8345: and exists

Line 8365: from FA_BOOKS_MRC_V BK,

8361: order by AD.asset_number asc;
8362:
8363: cursor GET_MEMBER_ASSETS_MRC (p_fiscal_year number,p_period_num number) is
8364: select distinct BK.ASSET_ID, AD.asset_number
8365: from FA_BOOKS_MRC_V BK,
8366: FA_ADDITIONS_B AD
8367: where BK.book_type_code = h_book_type_code
8368: and BK.group_asset_id = h_group_asset_id
8369: and exists

Line 8390: from FA_BOOKS BK1

8386:
8387: --*
8388: cursor GET_MAX_THID_IN_THIS_GROUP(p_fiscal_year number,p_period_num number,p_member_asset_id number) is
8389: select max(BK1.transaction_header_id_in)
8390: from FA_BOOKS BK1
8391: where BK1.book_type_code = h_book_type_code
8392: and BK1.asset_id = p_member_asset_id
8393: and BK1.group_asset_id = h_group_asset_id
8394: and exists

Line 8412: from FA_BOOKS BK1

8408: and BK1.TRANSACTION_HEADER_ID_IN = TH1.TRANSACTION_HEADER_ID);
8409:
8410: cursor GET_MAX_THID_IN_OTHER_GROUP(p_fiscal_year number,p_period_num number,p_member_asset_id number) is
8411: select max(BK1.transaction_header_id_in)
8412: from FA_BOOKS BK1
8413: where BK1.book_type_code = h_book_type_code
8414: and BK1.asset_id = p_member_asset_id
8415: and BK1.group_asset_id <> h_group_asset_id
8416: and exists

Line 8434: from FA_BOOKS_MRC_V BK1

8430: and BK1.TRANSACTION_HEADER_ID_IN = TH1.TRANSACTION_HEADER_ID);
8431:
8432: cursor GET_MAX_THID_IN_THIS_G_MRC(p_fiscal_year number,p_period_num number,p_member_asset_id number) is
8433: select max(BK1.transaction_header_id_in)
8434: from FA_BOOKS_MRC_V BK1
8435: where BK1.book_type_code = h_book_type_code
8436: and BK1.asset_id = p_member_asset_id
8437: and BK1.group_asset_id = h_group_asset_id
8438: and exists

Line 8456: from FA_BOOKS_MRC_V BK1

8452: and BK1.TRANSACTION_HEADER_ID_IN = TH1.TRANSACTION_HEADER_ID);
8453:
8454: cursor GET_MAX_THID_IN_OTHER_G_MRC(p_fiscal_year number,p_period_num number,p_member_asset_id number) is
8455: select max(BK1.transaction_header_id_in)
8456: from FA_BOOKS_MRC_V BK1
8457: where BK1.book_type_code = h_book_type_code
8458: and BK1.asset_id = p_member_asset_id
8459: and BK1.group_asset_id <> h_group_asset_id
8460: and exists

Line 8482: from fa_books bk

8478: select bk.allocate_to_fully_ret_flag,
8479: bk.allocate_to_fully_rsv_flag,
8480: bk.period_counter_fully_retired,
8481: bk.period_counter_fully_reserved
8482: from fa_books bk
8483: where bk.book_type_code = h_book_type_code
8484: and bk.asset_id = p_asset_id
8485: and bk.date_ineffective is null;
8486:

Line 8492: from fa_books_mrc_v bk

8488: select bk.allocate_to_fully_ret_flag,
8489: bk.allocate_to_fully_rsv_flag,
8490: bk.period_counter_fully_retired,
8491: bk.period_counter_fully_reserved
8492: from fa_books_mrc_v bk
8493: where bk.book_type_code = h_book_type_code
8494: and bk.asset_id = p_asset_id
8495: and bk.date_ineffective is null;
8496:

Line 8528: from FA_BOOKS BK_IN,

8524: BK_IN.ALLOWED_DEPRN_LIMIT_AMOUNT new_deprn_limit_amount,
8525: BK_IN.DEPRECIATE_FLAG depreciate_flag,
8526: BK_IN.group_asset_id group_asset_id,
8527: BK_IN.period_counter_fully_retired period_counter_fully_retired
8528: from FA_BOOKS BK_IN,
8529: FA_BOOKS BK_OUT
8530: where BK_IN.book_type_code = h_book_type_code
8531: and BK_IN.group_asset_id = h_group_asset_id
8532: and BK_IN.asset_id = h_member_asset_id

Line 8529: FA_BOOKS BK_OUT

8525: BK_IN.DEPRECIATE_FLAG depreciate_flag,
8526: BK_IN.group_asset_id group_asset_id,
8527: BK_IN.period_counter_fully_retired period_counter_fully_retired
8528: from FA_BOOKS BK_IN,
8529: FA_BOOKS BK_OUT
8530: where BK_IN.book_type_code = h_book_type_code
8531: and BK_IN.group_asset_id = h_group_asset_id
8532: and BK_IN.asset_id = h_member_asset_id
8533: and BK_IN.transaction_header_id_in = p_transaction_header_id

Line 8549: from FA_BOOKS_MRC_V BK_IN,

8545: BK_IN.ALLOWED_DEPRN_LIMIT_AMOUNT old_deprn_limit,
8546: BK_IN.DEPRECIATE_FLAG depreciate_flag,
8547: BK_IN.group_Asset_id group_asset_id,
8548: BK_IN.period_counter_fully_retired period_counter_fully_retired
8549: from FA_BOOKS_MRC_V BK_IN,
8550: FA_BOOKS_MRC_V BK_OUT
8551: where BK_IN.book_type_code = h_book_type_code
8552: and BK_IN.group_asset_id = h_group_asset_id
8553: and BK_IN.asset_id = h_member_asset_id

Line 8550: FA_BOOKS_MRC_V BK_OUT

8546: BK_IN.DEPRECIATE_FLAG depreciate_flag,
8547: BK_IN.group_Asset_id group_asset_id,
8548: BK_IN.period_counter_fully_retired period_counter_fully_retired
8549: from FA_BOOKS_MRC_V BK_IN,
8550: FA_BOOKS_MRC_V BK_OUT
8551: where BK_IN.book_type_code = h_book_type_code
8552: and BK_IN.group_asset_id = h_group_asset_id
8553: and BK_IN.asset_id = h_member_asset_id
8554: and BK_IN.transaction_header_id_in = p_transaction_header_id

Line 8638: --* cursor to populate Group Assets record from FA_BOOKS_SUMMARY

8634: where adj.asset_id = h_group_asset_id
8635: and adj.book_type_code = h_book_type_code
8636: and adj.period_counter_adjusted = p_period_counter;
8637:
8638: --* cursor to populate Group Assets record from FA_BOOKS_SUMMARY
8639: cursor GET_GROUP_INFO(p_period_counter number) is
8640: select FISCAL_YEAR,
8641: PERIOD_NUM,
8642: CALENDAR_PERIOD_OPEN_DATE,

Line 8664: from FA_BOOKS_SUMMARY

8660: -- EOFY_SALVAGE_VALULE,
8661: EOFY_RESERVE,
8662: SYSTEM_DEPRN_AMOUNT,
8663: SYSTEM_BONUS_DEPRN_AMOUNT
8664: from FA_BOOKS_SUMMARY
8665: where book_type_code = h_book_type_code
8666: and asset_id = h_group_asset_id
8667: and period_counter = p_period_counter;
8668:

Line 8694: from FA_BOOKS_SUMMARY_MRC_V

8690: -- EOFY_SALVAGE_VALULE,
8691: EOFY_RESERVE,
8692: SYSTEM_DEPRN_AMOUNT,
8693: SYSTEM_BONUS_DEPRN_AMOUNT
8694: from FA_BOOKS_SUMMARY_MRC_V
8695: where book_type_code = h_book_type_code
8696: and asset_id = h_group_asset_id
8697: and period_counter = p_period_counter;
8698:

Line 8702: from FA_BOOKS_SUMMARY

8698:
8699: cursor GET_GROUP_SYSTEM_INFO(p_fiscal_year number, p_period_counter_end number) is
8700: select sum(nvl(SYSTEM_DEPRN_AMOUNT,0)),
8701: sum(nvl(SYSTEM_BONUS_DEPRN_AMOUNT,0))
8702: from FA_BOOKS_SUMMARY
8703: where book_type_code = h_book_type_code
8704: and asset_id = h_group_asset_id
8705: and fiscal_year = p_fiscal_year
8706: and period_counter <= p_period_counter_end;

Line 8711: from FA_BOOKS_SUMMARY_MRC_V

8707:
8708: cursor GET_GROUP_SYSTEM_INFO_MRC(p_fiscal_year number, p_period_counter_end number) is
8709: select sum(nvl(SYSTEM_DEPRN_AMOUNT,0)),
8710: sum(nvl(SYSTEM_BONUS_DEPRN_AMOUNT,0))
8711: from FA_BOOKS_SUMMARY_MRC_V
8712: where book_type_code = h_book_type_code
8713: and asset_id = h_group_asset_id
8714: and fiscal_year = p_fiscal_year
8715: and period_counter <= p_period_counter_end;

Line 8721: from FA_BOOKS_SUMMARY

8717: --* cursor to populate Group Assets record (Temporary)
8718: cursor GET_GROUP_SALVAGE(p_fiscal_year number, p_period_num number) is
8719: select SALVAGE_VALUE,
8720: RECOVERABLE_COST
8721: from FA_BOOKS_SUMMARY
8722: where book_type_code = h_book_type_code
8723: and asset_id = h_group_asset_id
8724: and fiscal_year = p_fiscal_year
8725: and period_num = p_period_num;

Line 8730: from FA_BOOKS_SUMMARY_MRC_V

8726:
8727: cursor GET_GROUP_SALVAGE_MRC(p_fiscal_year number, p_period_num number) is
8728: select SALVAGE_VALUE,
8729: RECOVERABLE_COST
8730: from FA_BOOKS_SUMMARY_MRC_V
8731: where book_type_code = h_book_type_code
8732: and asset_id = h_group_asset_id
8733: and fiscal_year = p_fiscal_year
8734: and period_num = p_period_num;

Line 8736: -- cursor to query fa_books_summary for this member/period

8732: and asset_id = h_group_asset_id
8733: and fiscal_year = p_fiscal_year
8734: and period_num = p_period_num;
8735:
8736: -- cursor to query fa_books_summary for this member/period
8737: cursor GET_PRV_ROW_BS is
8738: select COST,
8739: SALVAGE_VALUE,
8740: RECOVERABLE_COST,

Line 8748: from FA_BOOKS_SUMMARY

8744: BONUS_DEPRN_RESERVE,
8745: YTD_DEPRN,
8746: BONUS_YTD_DEPRN,
8747: EOFY_RESERVE
8748: from FA_BOOKS_SUMMARY
8749: where book_type_code = h_book_type_code
8750: and group_asset_id = h_group_asset_id
8751: and period_counter = h_processing_period_counter -1
8752: and asset_id = h_member_asset_id;

Line 8765: from FA_BOOKS_SUMMARY_MRC_V

8761: BONUS_DEPRN_RESERVE,
8762: YTD_DEPRN,
8763: BONUS_YTD_DEPRN,
8764: EOFY_RESERVE
8765: from FA_BOOKS_SUMMARY_MRC_V
8766: where book_type_code = h_book_type_code
8767: and group_asset_id = h_group_asset_id
8768: and period_counter = h_processing_period_counter -1
8769: and asset_id = h_member_asset_id;

Line 8774: from FA_BOOKS BK_IN,

8770:
8771: --* Get new group asset id
8772: cursor GET_NEW_GROUP(p_member_asset_id number, p_transaction_header_id number) is
8773: select BK_IN.group_asset_id group_asset_id
8774: from FA_BOOKS BK_IN,
8775: FA_BOOKS BK_OUT
8776: where BK_IN.book_type_code = h_book_type_code
8777: and BK_IN.asset_id = h_member_asset_id
8778: and BK_IN.transaction_header_id_in = p_transaction_header_id

Line 8775: FA_BOOKS BK_OUT

8771: --* Get new group asset id
8772: cursor GET_NEW_GROUP(p_member_asset_id number, p_transaction_header_id number) is
8773: select BK_IN.group_asset_id group_asset_id
8774: from FA_BOOKS BK_IN,
8775: FA_BOOKS BK_OUT
8776: where BK_IN.book_type_code = h_book_type_code
8777: and BK_IN.asset_id = h_member_asset_id
8778: and BK_IN.transaction_header_id_in = p_transaction_header_id
8779: and BK_OUT.book_type_code(+) = BK_IN.book_type_code

Line 8786: from FA_BOOKS_MRC_V BK_IN,

8782: and BK_OUT.transaction_header_id_out(+) = BK_IN.transaction_header_id_in;
8783:
8784: cursor GET_NEW_GROUP_MRC(p_member_asset_id number, p_transaction_header_id number) is
8785: select BK_IN.group_Asset_id group_asset_id
8786: from FA_BOOKS_MRC_V BK_IN,
8787: FA_BOOKS_MRC_V BK_OUT
8788: where BK_IN.book_type_code = h_book_type_code
8789: and BK_IN.asset_id = h_member_asset_id
8790: and BK_IN.transaction_header_id_in = p_transaction_header_id

Line 8787: FA_BOOKS_MRC_V BK_OUT

8783:
8784: cursor GET_NEW_GROUP_MRC(p_member_asset_id number, p_transaction_header_id number) is
8785: select BK_IN.group_Asset_id group_asset_id
8786: from FA_BOOKS_MRC_V BK_IN,
8787: FA_BOOKS_MRC_V BK_OUT
8788: where BK_IN.book_type_code = h_book_type_code
8789: and BK_IN.asset_id = h_member_asset_id
8790: and BK_IN.transaction_header_id_in = p_transaction_header_id
8791: and BK_OUT.book_type_code(+) = BK_IN.book_type_code

Line 8812: -- Query Group Asset DPIS' period counter and amort date's period counter from FA_BOOKS

8808: h_book_type_code := p_asset_hdr_rec.book_type_code;
8809: h_group_asset_id := p_asset_hdr_rec.asset_id;
8810: h_group_dpis := p_asset_fin_rec_new.date_placed_in_service;
8811:
8812: -- Query Group Asset DPIS' period counter and amort date's period counter from FA_BOOKS
8813: select deprn_calendar, fiscal_year_name
8814: into h_deprn_calendar, h_fiscal_year_name
8815: from fa_book_controls
8816: where book_type_code = h_book_type_code;

Line 8896: from fa_books

8892: and period_close_date is null;
8893:
8894: select exclude_fully_rsv_flag,recognize_gain_loss
8895: into h_exclude_fully_rsv_flag,h_group_recognize_gain_loss
8896: from fa_books
8897: where book_type_code = h_book_type_code
8898: and asset_id = h_group_asset_id
8899: and date_ineffective is null;
8900:

Line 8914: from fa_books_mrc_v

8910: and period_close_date is null;
8911:
8912: select exclude_fully_rsv_flag,recognize_gain_loss
8913: into h_exclude_fully_rsv_flag,h_group_recognize_gain_loss
8914: from fa_books_mrc_v
8915: where book_type_code = h_book_type_code
8916: and asset_id = h_group_asset_id
8917: and date_ineffective is null;
8918: end if;

Line 9014: fa_debug_pkg.add(l_calling_fn, 'Need to query fa_books_summary table due to no data in'||

9010: if (p_log_level_rec.statement_level) then
9011: if (h_find_flag_1) then
9012: fa_debug_pkg.add(l_calling_fn, 'Memory Table has data for this asset', '+++', p_log_level_rec);
9013: else
9014: fa_debug_pkg.add(l_calling_fn, 'Need to query fa_books_summary table due to no data in'||
9015: ' memory table','+++', p_log_level_rec);
9016: end if;
9017: end if;
9018:

Line 9446: fa_debug_pkg.add(l_calling_fn, 'No data in FA_BOOKS_SUMMARY', '***', p_log_level_rec);

9442: h_bonus_ytd_deprn,
9443: h_eofy_reserve;
9444: if GET_PRV_ROW_BS%NOTFOUND then
9445: if (p_log_level_rec.statement_level) then
9446: fa_debug_pkg.add(l_calling_fn, 'No data in FA_BOOKS_SUMMARY', '***', p_log_level_rec);
9447: end if;
9448: else
9449: if (p_log_level_rec.statement_level) then
9450: fa_debug_pkg.add(l_calling_fn, 'Data in FA_BOOKS_SUMMARY', 'FOUND', p_log_level_rec);

Line 9450: fa_debug_pkg.add(l_calling_fn, 'Data in FA_BOOKS_SUMMARY', 'FOUND', p_log_level_rec);

9446: fa_debug_pkg.add(l_calling_fn, 'No data in FA_BOOKS_SUMMARY', '***', p_log_level_rec);
9447: end if;
9448: else
9449: if (p_log_level_rec.statement_level) then
9450: fa_debug_pkg.add(l_calling_fn, 'Data in FA_BOOKS_SUMMARY', 'FOUND', p_log_level_rec);
9451: end if;
9452: if h_processing_period_num = 1 then
9453: h_ytd_deprn := 0;
9454: h_bonus_ytd_deprn := 0;

Line 9883: fa_debug_pkg.add(l_calling_fn, 'No data in FA_BOOKS_SUMMARY', '***', p_log_level_rec);

9879: h_bonus_ytd_deprn,
9880: h_eofy_reserve;
9881: if GET_PRV_ROW_BS_MRC%NOTFOUND then
9882: if (p_log_level_rec.statement_level) then
9883: fa_debug_pkg.add(l_calling_fn, 'No data in FA_BOOKS_SUMMARY', '***', p_log_level_rec);
9884: end if;
9885: else
9886: if (p_log_level_rec.statement_level) then
9887: fa_debug_pkg.add(l_calling_fn, 'Data in FA_BOOKS_SUMMARY', 'FOUND', p_log_level_rec);

Line 9887: fa_debug_pkg.add(l_calling_fn, 'Data in FA_BOOKS_SUMMARY', 'FOUND', p_log_level_rec);

9883: fa_debug_pkg.add(l_calling_fn, 'No data in FA_BOOKS_SUMMARY', '***', p_log_level_rec);
9884: end if;
9885: else
9886: if (p_log_level_rec.statement_level) then
9887: fa_debug_pkg.add(l_calling_fn, 'Data in FA_BOOKS_SUMMARY', 'FOUND', p_log_level_rec);
9888: end if;
9889: if h_processing_period_num = 1 then
9890: h_ytd_deprn := 0;
9891: h_bonus_ytd_deprn := 0;

Line 10229: --* Following logic is prepared for exclude_salvage_value in FA_BOOKS is set.

10225: end if;
10226:
10227: End Loop; -- (For i IN 1.. h_length_of_loop)
10228:
10229: --* Following logic is prepared for exclude_salvage_value in FA_BOOKS is set.
10230: -- In this case, adjusted_cost of fully reserved should be removed from adjusted_cost
10231: -- of group asset. so need to maintain the memory table adjusted cost
10232: if nvl(h_exclude_fully_rsv_flag,'N') = 'Y' and
10233: nvl(fa_cache_pkg.fazccmt_record.deprn_basis_rule,'COST') = 'NBV' then

Line 10529: from fa_books

10525: fetch FA_ADJ_RESERVE into h_adj_reserve;
10526: close FA_ADJ_RESERVE;
10527:
10528: select eofy_reserve into h_eofy_reserve
10529: from fa_books
10530: where book_type_code = h_book_type_code
10531: and asset_id = h_member_asset_id
10532: and date_ineffective is null;
10533:

Line 10558: from fa_books_mrc_v

10554: fetch FA_ADJ_RESERVE_MRC into h_adj_reserve;
10555: close FA_ADJ_RESERVE_MRC;
10556:
10557: select eofy_reserve into h_eofy_reserve
10558: from fa_books_mrc_v
10559: where book_type_code = h_book_type_code
10560: and asset_id = h_member_asset_id
10561: and date_ineffective is null;
10562:

Line 10974: -- This function will be called to insert row into fa_books_summary if not exists

10970:
10971: --+=====================================================================
10972: -- Function: create_update_books_summary
10973: --
10974: -- This function will be called to insert row into fa_books_summary if not exists
10975: -- update fa_books_summary row if exists
10976: --
10977: --+=====================================================================
10978:

Line 10975: -- update fa_books_summary row if exists

10971: --+=====================================================================
10972: -- Function: create_update_books_summary
10973: --
10974: -- This function will be called to insert row into fa_books_summary if not exists
10975: -- update fa_books_summary row if exists
10976: --
10977: --+=====================================================================
10978:
10979: FUNCTION create_update_bs_table(p_trans_rec in FA_API_TYPES.trans_rec_type,

Line 10996: --* Cursor for FA_BOOKS_SUMMARY

10992: h_set_of_books_id number;
10993:
10994: h_chk_bs_flag varchar2(1);
10995:
10996: --* Cursor for FA_BOOKS_SUMMARY
10997: cursor CHK_BS_TABLE is
10998: select 'Y'
10999: from fa_books_summary
11000: where book_type_code = h_book_type_code

Line 10999: from fa_books_summary

10995:
10996: --* Cursor for FA_BOOKS_SUMMARY
10997: cursor CHK_BS_TABLE is
10998: select 'Y'
10999: from fa_books_summary
11000: where book_type_code = h_book_type_code
11001: -- and group_asset_id = h_group_asset_id
11002: and asset_id = h_member_asset_id
11003: and period_counter = h_period_counter;

Line 11008: from fa_books_summary_mrc_v

11004: -- and nvl(set_of_books_id, -99) = nvl(h_set_of_books_id, -99);
11005:
11006: cursor CHK_BS_TABLE_MRC is
11007: select 'Y'
11008: from fa_books_summary_mrc_v
11009: where book_type_code = h_book_type_code
11010: -- and group_asset_id = h_group_asset_id
11011: and asset_id = h_member_asset_id
11012: and period_counter = h_period_counter;

Line 11021: fa_debug_pkg.add(l_calling_fn, '## Start to insert/update fa_books_summary for member assets','####', p_log_level_rec);

11017:
11018: begin
11019:
11020: if (p_log_level_rec.statement_level) then
11021: fa_debug_pkg.add(l_calling_fn, '## Start to insert/update fa_books_summary for member assets','####', p_log_level_rec);
11022: fa_debug_pkg.add(l_calling_fn, 'h_book_type_code:h_group_asset_id',p_book_type_code||':'||p_group_asset_id, p_log_level_rec);
11023: fa_debug_pkg.add(l_calling_fn, 'p_track_member_table.COUNT', p_track_member_table.COUNT, p_log_level_rec);
11024: end if;
11025:

Line 11044: --* query fa_books_summary if this member record for this period exists or not

11040: fa_debug_pkg.add(l_calling_fn, 'cost', p_track_member_table(i).cost, p_log_level_rec);
11041: end if;
11042:
11043: if p_mrc_sob_type_code <> 'R' then
11044: --* query fa_books_summary if this member record for this period exists or not
11045: open CHK_BS_TABLE;
11046: fetch CHK_BS_TABLE into h_chk_bs_flag;
11047: if CHK_BS_TABLE%NOTFOUND then
11048: if (p_log_level_rec.statement_level) then

Line 11049: fa_debug_pkg.add(l_calling_fn, 'Newly insert following assets into fa_books_summary','###', p_log_level_rec);

11045: open CHK_BS_TABLE;
11046: fetch CHK_BS_TABLE into h_chk_bs_flag;
11047: if CHK_BS_TABLE%NOTFOUND then
11048: if (p_log_level_rec.statement_level) then
11049: fa_debug_pkg.add(l_calling_fn, 'Newly insert following assets into fa_books_summary','###', p_log_level_rec);
11050: fa_debug_pkg.add(l_calling_fn, 'h_member_asset_id:h_group_asset_id:h_period_counter',
11051: h_member_asset_id||':'||h_group_asset_id||':'||h_period_counter, p_log_level_rec);
11052: end if;
11053: -- This means to insert new row into FA_BOOKS_SUMMARY

Line 11053: -- This means to insert new row into FA_BOOKS_SUMMARY

11049: fa_debug_pkg.add(l_calling_fn, 'Newly insert following assets into fa_books_summary','###', p_log_level_rec);
11050: fa_debug_pkg.add(l_calling_fn, 'h_member_asset_id:h_group_asset_id:h_period_counter',
11051: h_member_asset_id||':'||h_group_asset_id||':'||h_period_counter, p_log_level_rec);
11052: end if;
11053: -- This means to insert new row into FA_BOOKS_SUMMARY
11054: INSERT INTO FA_BOOKS_SUMMARY
11055: (ASSET_ID,
11056: GROUP_ASSET_ID,
11057: BOOK_TYPE_CODE,

Line 11054: INSERT INTO FA_BOOKS_SUMMARY

11050: fa_debug_pkg.add(l_calling_fn, 'h_member_asset_id:h_group_asset_id:h_period_counter',
11051: h_member_asset_id||':'||h_group_asset_id||':'||h_period_counter, p_log_level_rec);
11052: end if;
11053: -- This means to insert new row into FA_BOOKS_SUMMARY
11054: INSERT INTO FA_BOOKS_SUMMARY
11055: (ASSET_ID,
11056: GROUP_ASSET_ID,
11057: BOOK_TYPE_CODE,
11058: PERIOD_COUNTER,

Line 11102: fa_debug_pkg.add(l_calling_fn, 'Update following assets into fa_books_summary:','####', p_log_level_rec);

11098: fa_debug_pkg.add(l_calling_fn, 'Inserted new row for', h_member_asset_id||':'||h_period_counter, p_log_level_rec);
11099: end if;
11100: else
11101: if (p_log_level_rec.statement_level) then
11102: fa_debug_pkg.add(l_calling_fn, 'Update following assets into fa_books_summary:','####', p_log_level_rec);
11103: fa_debug_pkg.add(l_calling_fn, 'h_member_asset_id:h_group_asset_id:h_period_counter',
11104: h_member_asset_id||':'||h_group_asset_id||':'||h_period_counter, p_log_level_rec);
11105: end if;
11106: UPDATE FA_BOOKS_SUMMARY

Line 11106: UPDATE FA_BOOKS_SUMMARY

11102: fa_debug_pkg.add(l_calling_fn, 'Update following assets into fa_books_summary:','####', p_log_level_rec);
11103: fa_debug_pkg.add(l_calling_fn, 'h_member_asset_id:h_group_asset_id:h_period_counter',
11104: h_member_asset_id||':'||h_group_asset_id||':'||h_period_counter, p_log_level_rec);
11105: end if;
11106: UPDATE FA_BOOKS_SUMMARY
11107: SET COST = p_track_member_table(i).cost
11108: , SALVAGE_VALUE = p_track_member_table(i).salvage_value
11109: , RECOVERABLE_COST = p_track_member_table(i).recoverable_cost
11110: , ADJUSTED_RECOVERABLE_COST = p_track_member_table(i).adjusted_recoverable_cost

Line 11134: --* query fa_books_summary if this member record for this period exists or not

11130: end if;
11131: close CHK_BS_TABLE;
11132: else -- Reporting Book
11133:
11134: --* query fa_books_summary if this member record for this period exists or not
11135: open CHK_BS_TABLE_MRC;
11136: fetch CHK_BS_TABLE_MRC into h_chk_bs_flag;
11137: if CHK_BS_TABLE_MRC%NOTFOUND then
11138: -- This means to insert new row into FA_BOOKS_SUMMARY

Line 11138: -- This means to insert new row into FA_BOOKS_SUMMARY

11134: --* query fa_books_summary if this member record for this period exists or not
11135: open CHK_BS_TABLE_MRC;
11136: fetch CHK_BS_TABLE_MRC into h_chk_bs_flag;
11137: if CHK_BS_TABLE_MRC%NOTFOUND then
11138: -- This means to insert new row into FA_BOOKS_SUMMARY
11139: INSERT INTO FA_MC_BOOKS_SUMMARY
11140: (SET_OF_BOOKS_ID,
11141: ASSET_ID,
11142: GROUP_ASSET_ID,

Line 11188: UPDATE FA_BOOKS_SUMMARY_MRC_V

11184: if (p_log_level_rec.statement_level) then
11185: fa_debug_pkg.add(l_calling_fn, 'Inserted new row for', h_member_asset_id||':'||h_period_counter, p_log_level_rec);
11186: end if;
11187: else
11188: UPDATE FA_BOOKS_SUMMARY_MRC_V
11189: SET COST = p_track_member_table(i).cost
11190: , SALVAGE_VALUE = p_track_member_table(i).salvage_value
11191: , RECOVERABLE_COST = p_track_member_table(i).recoverable_cost
11192: , ADJUSTED_RECOVERABLE_COST = p_track_member_table(i).adjusted_recoverable_cost

Line 11220: fa_debug_pkg.add(l_calling_fn, '## End of insert/update fa_books_summary for member assets','####', p_log_level_rec);

11216: end if;
11217: END LOOP;
11218:
11219: if (p_log_level_rec.statement_level) then
11220: fa_debug_pkg.add(l_calling_fn, '## End of insert/update fa_books_summary for member assets','####', p_log_level_rec);
11221: end if;
11222:
11223: return (true);
11224: