DBA Data[Home] [Help]

APPS.FA_RETIREMENT_PVT dependencies on FA_BOOKS

Line 79: from fa_books

75: and source_type_code = 'DEPRECIATION';
76:
77: CURSOR c_member_exists IS
78: select 'Y'
79: from fa_books
80: where book_type_code = p_asset_hdr_rec.book_type_code
81: and group_asset_id = p_asset_fin_rec.group_asset_id
82: and period_counter_fully_retired is null
83: and transaction_header_id_out is null

Line 630: FA_BOOKS_PKG.Update_Row(

626: end if;
627:
628: if (nvl(l_member_exists, 'N') <> 'Y') then
629:
630: FA_BOOKS_PKG.Update_Row(
631: X_Book_Type_Code => l_asset_hdr_rec.book_type_code,
632: X_Asset_Id => l_asset_hdr_rec.asset_id,
633: X_terminal_gain_loss_flag => 'Y',
634: X_mrc_sob_type_code => p_mrc_sob_type_code,

Line 651: UPDATE FA_BOOKS

647: AND BOOK_TYPE_CODE = p_asset_hdr_rec.book_type_code
648: AND TRANSACTION_HEADER_ID_OUT is null
649: AND set_of_books_id = p_asset_hdr_rec.set_of_books_id;
650: else
651: UPDATE FA_BOOKS
652: SET TERMINAL_GAIN_LOSS_FLAG = 'Y'
653: WHERE GROUP_ASSET_ID = l_asset_hdr_rec.asset_id
654: AND BOOK_TYPE_CODE = p_asset_hdr_rec.book_type_code
655: AND TRANSACTION_HEADER_ID_OUT is null;

Line 731: FA_BOOKS_PKG.Delete_Row(

727: CLOSE c_get_thid;
728:
729: if (p_mrc_sob_type_code = 'R') then
730:
731: FA_BOOKS_PKG.Delete_Row(
732: X_Transaction_Header_Id_in => l_transaction_header_id,
733: X_mrc_sob_type_code => p_mrc_sob_type_code,
734: X_set_of_books_id => p_set_of_books_id,
735: X_Calling_Fn => l_calling_fn, p_log_level_rec => p_log_level_rec);

Line 737: FA_BOOKS_PKG.Reactivate_Row(

733: X_mrc_sob_type_code => p_mrc_sob_type_code,
734: X_set_of_books_id => p_set_of_books_id,
735: X_Calling_Fn => l_calling_fn, p_log_level_rec => p_log_level_rec);
736:
737: FA_BOOKS_PKG.Reactivate_Row(
738: X_Transaction_Header_Id_Out => l_transaction_header_id,
739: X_mrc_sob_type_code => p_mrc_sob_type_code,
740: X_set_of_books_id => p_set_of_books_id,
741: X_Calling_Fn => l_calling_fn, p_log_level_rec => p_log_level_rec);

Line 754: FA_BOOKS_PKG.Delete_Row(

750: end loop;
751:
752: else
753:
754: FA_BOOKS_PKG.Delete_Row(
755: X_Transaction_Header_Id_in => l_transaction_header_id,
756: X_mrc_sob_type_code => p_mrc_sob_type_code,
757: X_set_of_books_id => p_set_of_books_id,
758: X_Calling_Fn => l_calling_fn, p_log_level_rec => p_log_level_rec);

Line 760: FA_BOOKS_PKG.Reactivate_Row(

756: X_mrc_sob_type_code => p_mrc_sob_type_code,
757: X_set_of_books_id => p_set_of_books_id,
758: X_Calling_Fn => l_calling_fn, p_log_level_rec => p_log_level_rec);
759:
760: FA_BOOKS_PKG.Reactivate_Row(
761: X_Transaction_Header_Id_Out => l_transaction_header_id,
762: X_mrc_sob_type_code => p_mrc_sob_type_code,
763: X_set_of_books_id => p_set_of_books_id,
764: X_Calling_Fn => l_calling_fn, p_log_level_rec => p_log_level_rec);

Line 1227: FA_BOOKS_PKG.Deactivate_Row(

1223: --
1224: -- Find Salvage value retired, recoverable cost, deprn limit, adjusted recoverable cost
1225: -- cip_cost_retired, new adjusted cost by calling deprn basis.
1226: -- Also find out whether there is other amount to reinstate. I guess not.
1227: FA_BOOKS_PKG.Deactivate_Row(
1228: X_Asset_Id => p_asset_hdr_rec.asset_id,
1229: X_Book_Type_Code => p_asset_hdr_rec.book_type_code,
1230: X_Transaction_Header_Id_Out => p_trans_rec.transaction_header_id,
1231: X_Date_Ineffective => p_trans_rec.who_info.last_update_date,

Line 1238: FA_BOOKS_PKG.INSERT_ROW(

1234: X_Calling_Fn => l_calling_fn, p_log_level_rec => p_log_level_rec);
1235:
1236: --tk_util.DumpFinRec(l_asset_fin_rec_mn, 'member');
1237:
1238: FA_BOOKS_PKG.INSERT_ROW(
1239: X_Rowid => l_rowid,
1240: X_Book_Type_Code => p_asset_hdr_rec.book_type_code,
1241: X_Asset_Id => p_asset_hdr_rec.asset_id,
1242: X_Date_Placed_In_Service => p_asset_fin_rec.date_placed_in_service,

Line 1422: FA_BOOKS_PKG.Update_Row(

1418:
1419: end if; -- (nvl(l_asset_fin_rec_old.member_rollup_flag, 'N') = 'Y')
1420:
1421: -- +++++ Clear Terminal Gain Loss Amount +++++
1422: FA_BOOKS_PKG.Update_Row(
1423: X_Book_Type_Code => l_asset_hdr_rec.book_type_code,
1424: X_Asset_Id => l_asset_hdr_rec.asset_id,
1425: X_terminal_gain_loss_amount => FND_API.G_MISS_NUM,
1426: X_mrc_sob_type_code => p_mrc_sob_type_code,

Line 1544: , fa_books bk -- ENERGY

1540: CURSOR c_get_group_method_info is -- ENERGY
1541: select db.rule_name -- ENERGY
1542: from fa_deprn_basis_rules db -- ENERGY
1543: , fa_methods mt -- ENERGY
1544: , fa_books bk -- ENERGY
1545: where bk.asset_id = p_asset_fin_rec.group_asset_id -- ENERGY
1546: and bk.book_type_code = p_asset_hdr_rec.book_type_code -- ENERGY
1547: and bk.transaction_header_id_out is null -- ENERGY
1548: and bk.deprn_method_code = mt.method_code -- ENERGY

Line 2351: from fa_books inbk , fa_books outbk

2347:
2348: /* Added for bug 8527733 */
2349: CURSOR c_get_ret_salvage IS
2350: select outbk.salvage_value - inbk.salvage_value
2351: from fa_books inbk , fa_books outbk
2352: where inbk.transaction_header_id_in = p_asset_retire_rec.detail_info.transaction_header_id_in
2353: and outbk.asset_id = p_asset_hdr_rec.asset_id
2354: and outbk.book_type_code = p_asset_hdr_rec.book_type_code
2355: and outbk.transaction_header_id_out = p_asset_retire_rec.detail_info.transaction_header_id_in;

Line 3155: from fa_books

3151: where trx.transaction_header_id = p_ret.th_id_in;
3152:
3153: CURSOR c_member_exists IS
3154: select 'Y'
3155: from fa_books
3156: where book_type_code = p_ret.book
3157: and group_asset_id = p_bk.group_asset_id
3158: and ((period_counter_fully_retired is null)
3159: or (period_counter_fully_retired is not null

Line 3430: FA_BOOKS_PKG.Update_Row(

3426: if (nvl(l_member_exists, 'N') <> 'Y') then
3427:
3428: if (nvl(l_asset_fin_rec_old.terminal_gain_loss, 'NO') = 'END_OF_YEAR') then
3429:
3430: FA_BOOKS_PKG.Update_Row(
3431: X_Book_Type_Code => l_asset_hdr_rec.book_type_code,
3432: X_Asset_Id => l_asset_hdr_rec.asset_id,
3433: X_terminal_gain_loss_flag => 'Y',
3434: X_mrc_sob_type_code => p_mrc_sob_type_code,

Line 3487: -- update terminal gain loss amount in fa_books

3483: end if;
3484:
3485: -- If remaining resrve is not 0, insert NBV RETIRED GAIN/LOSS,
3486: -- and RESERVE to fa_adjustments table.
3487: -- update terminal gain loss amount in fa_books
3488: if (nvl(l_deprn_reserve, 0) <> 0) then
3489:
3490: if (p_log_level_rec.statement_level) then
3491: fa_debug_pkg.add(l_calling_fn, 'Create Terminal Gain/Loss entries',

Line 3562: FA_BOOKS_PKG.Update_Row(

3558: fa_debug_pkg.add(l_calling_fn, 'Create Terminal Gain/Loss entries',
3559: 'End', p_log_level_rec => p_log_level_rec);
3560: end if;
3561:
3562: FA_BOOKS_PKG.Update_Row(
3563: X_Book_Type_Code => l_asset_hdr_rec.book_type_code,
3564: X_Asset_Id => l_asset_hdr_rec.asset_id,
3565: X_terminal_gain_loss_amount => l_deprn_reserve,
3566: X_mrc_sob_type_code => p_mrc_sob_type_code,

Line 3974: FA_BOOKS_PKG.Update_Row(

3970:
3971: end if; -- (nvl(l_asset_fin_rec_old.member_rollup_flag, 'N') = 'N')
3972:
3973: -- +++++ Clear Terminal Gain Loss Amount +++++
3974: FA_BOOKS_PKG.Update_Row(
3975: X_Book_Type_Code => l_asset_hdr_rec.book_type_code,
3976: X_Asset_Id => l_asset_hdr_rec.asset_id,
3977: X_terminal_gain_loss_amount => FND_API.G_MISS_NUM,
3978: X_mrc_sob_type_code => p_mrc_sob_type_code,

Line 4027: from fa_books

4023: l_calling_fn VARCHAR2(50) := 'FA_RETIREMENT_PVT.Do_Terminal_Gain_Loss_All_Bk';
4024:
4025: cursor c_member_exists IS
4026: select 'Y'
4027: from fa_books
4028: where book_type_code = p_book_type_code
4029: and group_asset_id = p_asset_id
4030: and period_counter_fully_retired is null
4031: and transaction_header_id_out is null;

Line 4038: fa_books bk

4034: select max(gth.transaction_header_id)
4035: from fa_transaction_headers gth,
4036: fa_transaction_headers mth,
4037: fa_retirements ret,
4038: fa_books bk
4039: where bk.group_asset_id = p_asset_id
4040: and bk.book_type_code = p_book_type_code
4041: and ret.asset_id = bk.asset_id
4042: and ret.book_type_code = p_book_type_code

Line 4242: FA_BOOKS_PKG.Update_Row(

4238:
4239: raise gl_err;
4240: end if;
4241:
4242: FA_BOOKS_PKG.Update_Row(
4243: X_Book_Type_Code => p_book_type_code,
4244: X_Asset_Id => p_asset_id,
4245: X_terminal_gain_loss_amount => l_deprn_reserve,
4246: X_terminal_gain_loss_flag => 'N',

Line 4260: FA_BOOKS_PKG.Update_Row(

4256: --
4257: -- Must not calculate terminal gain loss as long as some
4258: -- non-retired member exists
4259: --
4260: FA_BOOKS_PKG.Update_Row(
4261: X_Book_Type_Code => p_book_type_code,
4262: X_Asset_Id => p_asset_id,
4263: X_terminal_gain_loss_flag => FND_API.G_MISS_CHAR,
4264: X_mrc_sob_type_code => p_mrc_sob_type_code,

Line 4298: from fa_books bk,

4294: l_period_rec FA_API_TYPES.period_rec_type;
4295:
4296: cursor c_get_groups is
4297: select bk.asset_id asset_id
4298: from fa_books bk,
4299: fa_additions ad
4300: where bk.book_type_code = p_book_type_code
4301: and bk.transaction_header_id_out is null
4302: and bk.asset_id = ad.asset_id

Line 4310: from fa_books bk,

4306: and MOD(bk.asset_id, p_total_requests) = (p_request_number - 1);
4307:
4308: cursor c_get_eofy_groups is
4309: select bk.asset_id asset_id
4310: from fa_books bk,
4311: fa_additions ad
4312: where bk.book_type_code = p_book_type_code
4313: and bk.transaction_header_id_out is null
4314: and bk.asset_id = ad.asset_id

Line 4468: from fa_books

4464: -- if there is any.
4465: --
4466: CURSOR c_find_member IS
4467: select asset_id
4468: from fa_books
4469: where group_asset_id = p_asset_hdr_rec.asset_id
4470: and book_type_code = p_asset_hdr_rec.book_type_code
4471: and period_counter_fully_retired is null
4472: and transaction_header_id_out is null;

Line 4629: UPDATE FA_BOOKS

4625: /*bug#15897249 ends */
4626:
4627: else
4628:
4629: UPDATE FA_BOOKS
4630: SET TERMINAL_GAIN_LOSS_FLAG = 'Y'
4631: WHERE ASSET_ID = p_asset_hdr_rec.asset_id
4632: AND BOOK_TYPE_CODE = p_asset_hdr_rec.book_type_code
4633: AND TRANSACTION_HEADER_ID_OUT is null;

Line 4635: UPDATE FA_BOOKS_SUMMARY

4631: WHERE ASSET_ID = p_asset_hdr_rec.asset_id
4632: AND BOOK_TYPE_CODE = p_asset_hdr_rec.book_type_code
4633: AND TRANSACTION_HEADER_ID_OUT is null;
4634:
4635: UPDATE FA_BOOKS_SUMMARY
4636: SET TERMINAL_GAIN_LOSS_FLAG = 'Y'
4637: WHERE ASSET_ID = p_asset_hdr_rec.asset_id
4638: AND BOOK_TYPE_CODE = p_asset_hdr_rec.book_type_code
4639: AND PERIOD_COUNTER = p_period_rec.period_counter;

Line 4642: UPDATE FA_BOOKS

4638: AND BOOK_TYPE_CODE = p_asset_hdr_rec.book_type_code
4639: AND PERIOD_COUNTER = p_period_rec.period_counter;
4640:
4641: /*bug#15897249 starts */
4642: UPDATE FA_BOOKS
4643: SET TERMINAL_GAIN_LOSS_FLAG = 'Y'
4644: WHERE GROUP_ASSET_ID = p_asset_hdr_rec.asset_id
4645: AND BOOK_TYPE_CODE = p_asset_hdr_rec.book_type_code
4646: AND TRANSACTION_HEADER_ID_OUT is null

Line 4703: l_rein_mem_deprn_resv fa_books.adjusted_cost%type;

4699: l_ind number;
4700: bln_rein_mem_reqd boolean := FALSE;
4701: bln_other_mem_exists boolean := FALSE;
4702: bln_use_cur_asset boolean := TRUE;
4703: l_rein_mem_deprn_resv fa_books.adjusted_cost%type;
4704: l_rein_mem_adj_cost fa_books.adjusted_cost%type;
4705:
4706:
4707: CURSOR c_reins_mem_details IS

Line 4704: l_rein_mem_adj_cost fa_books.adjusted_cost%type;

4700: bln_rein_mem_reqd boolean := FALSE;
4701: bln_other_mem_exists boolean := FALSE;
4702: bln_use_cur_asset boolean := TRUE;
4703: l_rein_mem_deprn_resv fa_books.adjusted_cost%type;
4704: l_rein_mem_adj_cost fa_books.adjusted_cost%type;
4705:
4706:
4707: CURSOR c_reins_mem_details IS
4708: SELECT BK.ASSET_ID ASSET_ID

Line 4713: FROM FA_BOOKS BK

4709: , BK.TRANSACTION_HEADER_ID_IN TRANSACTION_HEADER_ID_IN
4710: , BK.RATE_ADJUSTMENT_FACTOR RATE_ADJUSTMENT_FACTOR
4711: , BK.ADJUSTED_COST ADJUSTED_COST
4712: , BK.RECOVERABLE_COST RECOVERABLE_COST
4713: FROM FA_BOOKS BK
4714: , FA_ADDITIONS_B AD
4715: , fa_transaction_headers th
4716: WHERE BK.BOOK_TYPE_CODE = p_asset_hdr_rec.book_type_code
4717: AND BK.TRANSACTION_HEADER_ID_OUT is null

Line 4748: FROM FA_BOOKS

4744: /* bug 8633654 ends*/
4745:
4746: CURSOR C_GET_SUM_REC_COST IS
4747: SELECT SUM(RECOVERABLE_COST)
4748: FROM FA_BOOKS
4749: WHERE BOOK_TYPE_CODE = p_asset_hdr_rec.book_type_code
4750: AND TRANSACTION_HEADER_ID_OUT is null
4751: AND PERIOD_COUNTER_FULLY_RESERVED is null
4752: AND PERIOD_COUNTER_FULLY_RETIRED is null

Line 4770: FROM FA_BOOKS_SUMMARY

4766: AND set_of_books_id = p_asset_hdr_rec.set_of_books_id;
4767:
4768: CURSOR C_GET_BS_SUM_ADJ_COST IS
4769: SELECT SUM(ADJUSTED_COST)
4770: FROM FA_BOOKS_SUMMARY
4771: WHERE BOOK_TYPE_CODE = p_asset_hdr_rec.book_type_code
4772: AND TRANSACTION_HEADER_ID_OUT is null
4773: AND nvl(FULLY_RESERVED_FLAG, 'N') = 'N'
4774: AND nvl(FULLY_RETIRED_FLAG, 'N') = 'N'

Line 4817: FROM FA_BOOKS BK

4813: , BK.ADJUSTED_RECOVERABLE_COST ADJUSTED_RECOVERABLE_COST
4814: , AD.ASSET_CATEGORY_ID ASSET_CATEGORY_ID
4815: , AD.CURRENT_UNITS CURRENT_UNITS
4816: , 'NO' REINS_ASSET_FLAG
4817: FROM FA_BOOKS BK
4818: , FA_ADDITIONS_B AD
4819: WHERE BK.BOOK_TYPE_CODE = p_asset_hdr_rec.book_type_code
4820: AND BK.TRANSACTION_HEADER_ID_OUT is null
4821: AND BK.GROUP_ASSET_ID = p_asset_hdr_rec.asset_id

Line 4839: FROM FA_BOOKS BK

4835: , BK.ADJUSTED_RECOVERABLE_COST ADJUSTED_RECOVERABLE_COST
4836: , AD.ASSET_CATEGORY_ID ASSET_CATEGORY_ID
4837: , AD.CURRENT_UNITS CURRENT_UNITS
4838: , 'YES' REINS_ASSET_FLAG
4839: FROM FA_BOOKS BK
4840: , FA_ADDITIONS_B AD
4841: WHERE BK.BOOK_TYPE_CODE = p_asset_hdr_rec.book_type_code
4842: AND BK.TRANSACTION_HEADER_ID_OUT is null
4843: AND BK.GROUP_ASSET_ID = p_asset_hdr_rec.asset_id

Line 4917: FROM FA_BOOKS BK

4913: , BK.RECOVERABLE_COST -
4914: (FA_UTIL_PVT.get_asset_deprn_resv(p_asset_hdr_rec.book_type_code,BK.ASSET_ID, p_asset_hdr_rec.set_of_books_id
4915: , null, 'P' ) )
4916: ADJUSTED_COST
4917: FROM FA_BOOKS BK
4918: WHERE BOOK_TYPE_CODE = p_asset_hdr_rec.book_type_code
4919: AND TRANSACTION_HEADER_ID_OUT is null
4920: AND GROUP_ASSET_ID = p_asset_hdr_rec.asset_id
4921: AND PERIOD_COUNTER_FULLY_RESERVED is null

Line 4964: , fa_books bk

4960: , fa_transaction_headers gth -- group
4961: , fa_adjustments aj
4962: , fa_deprn_periods dp
4963: , fa_additions_b ad
4964: , fa_books bk
4965: where th.book_type_code = p_asset_hdr_rec.book_type_code
4966: -- and th.date_effective = gth.date_effective
4967: and th.source_transaction_header_id = gth.transaction_header_id
4968: and gth.book_type_code = p_asset_hdr_rec.book_type_code

Line 5031: from fa_books

5027: , bk.adjusted_recoverable_cost;
5028:
5029: CURSOR c_get_thid (c_asset_id number) IS
5030: select transaction_header_id_in
5031: from fa_books
5032: where book_type_code = p_asset_hdr_rec.book_type_code
5033: and asset_id = c_asset_id
5034: and transaction_header_id_out is null;
5035:

Line 5828: -- Deactivate FA_BOOKS row for processed assets

5824: AND TRANSACTION_HEADER_ID_OUT IS NULL
5825: AND set_of_books_id = p_asset_hdr_rec.set_of_books_id;
5826:
5827: l_loc := 'Before MRC Books';
5828: -- Deactivate FA_BOOKS row for processed assets
5829: FORALL i in t_asset_id.first..t_asset_id.last
5830: UPDATE FA_MC_BOOKS
5831: SET DATE_INEFFECTIVE = p_trans_rec.who_info.last_update_date
5832: , TRANSACTION_HEADER_ID_OUT = t_thid(i)

Line 5837: -- Insert new FA_BOOKS records for processed assets

5833: WHERE TRANSACTION_HEADER_ID_IN = t_transaction_header_id_in(i)
5834: AND set_of_books_id = p_asset_hdr_rec.set_of_books_id;
5835:
5836: l_loc := 'Before MRC Insert Books';
5837: -- Insert new FA_BOOKS records for processed assets
5838: FORALL i in t_asset_id.first..t_asset_id.last
5839: INSERT INTO FA_MC_BOOKS( BOOK_TYPE_CODE
5840: , ASSET_ID
5841: , DATE_PLACED_IN_SERVICE

Line 6075: -- Update FA_BOOKS_SUMAMRY table with new reserve adjustment amount and

6071: AND set_of_books_id = p_asset_hdr_rec.set_of_books_id;
6072:
6073: else
6074: l_loc := 'Before BS';
6075: -- Update FA_BOOKS_SUMAMRY table with new reserve adjustment amount and
6076: -- related columns. Return new adjusted_cost and deprn reserve for later use
6077: FORALL i in t_asset_id.first..t_asset_id.last
6078: UPDATE FA_BOOKS_SUMMARY
6079: SET RESERVE_ADJUSTMENT_AMOUNT = RESERVE_ADJUSTMENT_AMOUNT + t_adjustment_amount(i)

Line 6078: UPDATE FA_BOOKS_SUMMARY

6074: l_loc := 'Before BS';
6075: -- Update FA_BOOKS_SUMAMRY table with new reserve adjustment amount and
6076: -- related columns. Return new adjusted_cost and deprn reserve for later use
6077: FORALL i in t_asset_id.first..t_asset_id.last
6078: UPDATE FA_BOOKS_SUMMARY
6079: SET RESERVE_ADJUSTMENT_AMOUNT = RESERVE_ADJUSTMENT_AMOUNT + t_adjustment_amount(i)
6080: , DEPRN_RESERVE = DEPRN_RESERVE + t_adjustment_amount(i)
6081: , ADJUSTED_COST = RECOVERABLE_COST - DEPRN_RESERVE - t_adjustment_amount(i)
6082: WHERE ASSET_ID = t_asset_id(i)

Line 6096: -- Deactivate FA_BOOKS row for processed assets

6092: end loop;
6093: end if;
6094:
6095: l_loc := 'Before primary Books';
6096: -- Deactivate FA_BOOKS row for processed assets
6097: FORALL i in t_asset_id.first..t_asset_id.last
6098: UPDATE FA_BOOKS
6099: SET DATE_INEFFECTIVE = p_trans_rec.who_info.last_update_date
6100: , TRANSACTION_HEADER_ID_OUT = t_thid(i)

Line 6098: UPDATE FA_BOOKS

6094:
6095: l_loc := 'Before primary Books';
6096: -- Deactivate FA_BOOKS row for processed assets
6097: FORALL i in t_asset_id.first..t_asset_id.last
6098: UPDATE FA_BOOKS
6099: SET DATE_INEFFECTIVE = p_trans_rec.who_info.last_update_date
6100: , TRANSACTION_HEADER_ID_OUT = t_thid(i)
6101: WHERE TRANSACTION_HEADER_ID_IN = t_transaction_header_id_in(i);
6102:

Line 6104: -- Insert new FA_BOOKS records for processed assets

6100: , TRANSACTION_HEADER_ID_OUT = t_thid(i)
6101: WHERE TRANSACTION_HEADER_ID_IN = t_transaction_header_id_in(i);
6102:
6103: l_loc := 'Before primary Insert Books';
6104: -- Insert new FA_BOOKS records for processed assets
6105: FORALL i in t_asset_id.first..t_asset_id.last
6106: INSERT INTO FA_BOOKS( BOOK_TYPE_CODE
6107: , ASSET_ID
6108: , DATE_PLACED_IN_SERVICE

Line 6106: INSERT INTO FA_BOOKS( BOOK_TYPE_CODE

6102:
6103: l_loc := 'Before primary Insert Books';
6104: -- Insert new FA_BOOKS records for processed assets
6105: FORALL i in t_asset_id.first..t_asset_id.last
6106: INSERT INTO FA_BOOKS( BOOK_TYPE_CODE
6107: , ASSET_ID
6108: , DATE_PLACED_IN_SERVICE
6109: , DATE_EFFECTIVE
6110: , DEPRN_START_DATE

Line 6334: FROM FA_BOOKS

6330: , TERMINAL_GAIN_LOSS_FLAG
6331: , SUPER_GROUP_ID
6332: , OVER_DEPRECIATE_OPTION
6333: , DISABLED_FLAG
6334: FROM FA_BOOKS
6335: WHERE TRANSACTION_HEADER_ID_IN = t_transaction_header_id_in(i);
6336:
6337: end if; -- (p_mrc_sob_type_code = 'R')
6338:

Line 6490: UPDATE FA_BOOKS_SUMMARY

6486: WHERE ASSET_ID = l_last_asset_id
6487: AND BOOK_TYPE_CODE = p_asset_hdr_rec.book_type_code
6488: AND TRANSACTION_HEADER_ID = l_last_thid);
6489:
6490: UPDATE FA_BOOKS_SUMMARY
6491: SET RESERVE_ADJUSTMENT_AMOUNT = RESERVE_ADJUSTMENT_AMOUNT + ( l_reallocate_amount * sign(p_reserve_amount) * -1 )
6492: , DEPRN_RESERVE = DEPRN_RESERVE + ( l_reallocate_amount * sign(p_reserve_amount) * -1 )
6493: , ADJUSTED_COST = ADJUSTED_COST - ( l_reallocate_amount * sign(p_reserve_amount) * -1 )
6494: WHERE ASSET_ID = l_last_asset_id

Line 6500: UPDATE FA_BOOKS

6496: AND PERIOD_COUNTER = p_period_rec.period_counter
6497: AND TRANSACTION_HEADER_ID_OUT IS NULL;
6498:
6499:
6500: UPDATE FA_BOOKS
6501: SET ADJUSTED_COST = ADJUSTED_COST - ( l_reallocate_amount * sign(p_reserve_amount) * -1 )
6502: WHERE TRANSACTION_HEADER_ID_IN = l_last_thid;
6503: end if; -- (p_mrc_sob_type_code = 'R')
6504: else

Line 6619: UPDATE FA_BOOKS_SUMMARY

6615: WHERE ASSET_ID = t_asset_id(i)
6616: AND BOOK_TYPE_CODE = p_asset_hdr_rec.book_type_code
6617: AND TRANSACTION_HEADER_ID = t_thid(i));
6618:
6619: UPDATE FA_BOOKS_SUMMARY
6620: SET RESERVE_ADJUSTMENT_AMOUNT = RESERVE_ADJUSTMENT_AMOUNT + (l_reallocate_amount * sign(p_reserve_amount) * -1)
6621: , DEPRN_RESERVE = DEPRN_RESERVE + (l_reallocate_amount * sign(p_reserve_amount) * -1)
6622: , ADJUSTED_COST = ADJUSTED_COST + l_reallocate_amount
6623: WHERE ASSET_ID = t_asset_id(i)

Line 6629: UPDATE FA_BOOKS

6625: AND PERIOD_COUNTER = p_period_rec.period_counter
6626: AND TRANSACTION_HEADER_ID_OUT is null;
6627:
6628:
6629: UPDATE FA_BOOKS
6630: SET ADJUSTED_COST = ADJUSTED_COST + l_reallocate_amount
6631: WHERE TRANSACTION_HEADER_ID_IN = t_thid(i);
6632: end if;
6633:

Line 6678: UPDATE FA_BOOKS_SUMMARY

6674: WHERE ASSET_ID = t_asset_id(i)
6675: AND BOOK_TYPE_CODE = p_asset_hdr_rec.book_type_code
6676: AND TRANSACTION_HEADER_ID = t_thid(i));
6677:
6678: UPDATE FA_BOOKS_SUMMARY
6679: SET RESERVE_ADJUSTMENT_AMOUNT = RESERVE_ADJUSTMENT_AMOUNT + t_adjusted_cost(i)
6680: , DEPRN_RESERVE = ADJUSTED_RECOVERABLE_COST
6681: , ADJUSTED_COST = RECOVERABLE_COST - ADJUSTED_RECOVERABLE_COST
6682: WHERE ASSET_ID = t_asset_id(i)

Line 6687: UPDATE FA_BOOKS

6683: AND BOOK_TYPE_CODE = p_asset_hdr_rec.book_type_code
6684: AND PERIOD_COUNTER = p_period_rec.period_counter;
6685:
6686:
6687: UPDATE FA_BOOKS
6688: SET ADJUSTED_COST = RECOVERABLE_COST - ADJUSTED_RECOVERABLE_COST
6689: WHERE TRANSACTION_HEADER_ID_IN = t_thid(i);
6690: end if;
6691: