DBA Data[Home] [Help]

APPS.FA_RETIREMENT_PVT dependencies on FA_ADJUSTMENTS

Line 71: from fa_adjustments

67: debit_credit_flag,
68: adjustment_amount,
69: period_counter_adjusted,
70: period_counter_created
71: from fa_adjustments
72: where asset_id = l_asset_hdr_rec.asset_id
73: and book_type_code = l_asset_hdr_rec.book_type_code
74: and transaction_header_id = l_trans_rec.transaction_header_id
75: and source_type_code = 'DEPRECIATION';

Line 284: -- into FA_ADJUSTMENTS.

280: l_cglfr_mode := 'CR';
281: end if;
282: --
283: -- Insert COST, RESERVE, PROCEEDS CLR, and REMOVALCOST CLR
284: -- into FA_ADJUSTMENTS.
285: --
286:
287: /* Added for bug 7537762 */
288: if not fa_util_pvt.get_asset_deprn_rec (

Line 709: from fa_adjustments

705: l_transaction_header_id NUMBER(15);
706:
707: CURSOR c_adj IS
708: select rowid
709: from fa_adjustments
710: where asset_id = p_group_asset_id
711: and book_type_code = p_asset_hdr_rec.book_type_code
712: and transaction_header_id = l_transaction_header_id;
713:

Line 745: FA_ADJUSTMENTS_PKG.DELETE_ROW(

741: X_Calling_Fn => l_calling_fn, p_log_level_rec => p_log_level_rec);
742:
743: for l_adj in c_mc_adj loop
744:
745: FA_ADJUSTMENTS_PKG.DELETE_ROW(
746: X_Rowid => l_adj.rowid,
747: X_mrc_sob_type_code => p_mrc_sob_type_code,
748: X_set_of_books_id => p_set_of_books_id,
749: X_Calling_Fn => l_calling_fn, p_log_level_rec => p_log_level_rec);

Line 768: FA_ADJUSTMENTS_PKG.DELETE_ROW(

764: X_Calling_Fn => l_calling_fn, p_log_level_rec => p_log_level_rec);
765:
766: for l_adj in c_adj loop
767:
768: FA_ADJUSTMENTS_PKG.DELETE_ROW(
769: X_Rowid => l_adj.rowid,
770: X_mrc_sob_type_code => p_mrc_sob_type_code,
771: X_set_of_books_id => p_set_of_books_id,
772: X_Calling_Fn => l_calling_fn, p_log_level_rec => p_log_level_rec);

Line 1411: DELETE FROM FA_ADJUSTMENTS

1407: fa_debug_pkg.add(l_calling_fn, 'Process Member Rollup Group',
1408: l_asset_hdr_rec.asset_id, p_log_level_rec => p_log_level_rec);
1409: end if;
1410: -- +++++ Remove group expense rows +++++
1411: DELETE FROM FA_ADJUSTMENTS
1412: WHERE ASSET_ID = l_asset_hdr_rec.asset_id
1413: AND BOOK_TYPE_CODE = l_asset_hdr_rec.book_type_code
1414: AND TRANSACTION_HEADER_ID = l_trans_rec.member_transaction_header_id
1415: AND SOURCE_TYPE_CODE = 'DEPRECIATION'

Line 2423: FROM FA_ADJUSTMENTS

2419: ANNUALIZED_ADJUSTMENT,
2420: PERIOD_COUNTER_ADJUSTED,
2421: PERIOD_COUNTER_CREATED,
2422: ASSET_INVOICE_ID
2423: FROM FA_ADJUSTMENTS
2424: WHERE TRANSACTION_HEADER_ID = l_group_thid
2425: AND ASSET_ID = l_group_asset_id
2426: AND BOOK_TYPE_CODE = p_asset_hdr_rec.book_type_code
2427: AND PERIOD_COUNTER_CREATED = l_period_rec.period_counter

Line 3486: -- and RESERVE to fa_adjustments table.

3482: l_deprn_reserve, p_log_level_rec => p_log_level_rec);
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

Line 3634: from fa_adjustments

3630: --+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
3631: CURSOR c_get_rsv_retired (c_transaction_header_id number) IS
3632: select sum(decode(debit_credit_flag, 'CR', -1 * adjustment_amount,
3633: adjustment_amount))
3634: from fa_adjustments
3635: where source_type_code = 'RETIREMENT'
3636: and adjustment_type = 'RESERVE'
3637: and asset_id = p_ret.asset_id
3638: and book_type_code = p_ret.book

Line 3662: from fa_adjustments aj, fa_transaction_headers th

3658: -- gets expense that retirement created
3659: --+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
3660: CURSOR c_get_ret_info IS
3661: select sum(decode(debit_credit_flag, 'DR', -1, 1) * adjustment_amount)
3662: from fa_adjustments aj, fa_transaction_headers th
3663: where aj.source_type_code = 'RETIREMENT'
3664: and aj.adjustment_type = 'EXPENSE'
3665: and aj.asset_id = p_bk.group_asset_id
3666: and aj.book_type_code = p_ret.book

Line 3910: UPDATE FA_ADJUSTMENTS

3906: l_asset_fin_rec_adj.allowed_deprn_limit_amount :=
3907: nvl(l_asset_fin_rec_new_m.allowed_deprn_limit_amount, 0) -
3908: nvl(p_bk.allowed_deprn_limit_amount, 0);
3909:
3910: UPDATE FA_ADJUSTMENTS
3911: SET TRANSACTION_HEADER_ID = l_trans_rec.transaction_header_id
3912: WHERE TRANSACTION_HEADER_ID = l_trans_rec.member_transaction_header_id
3913: AND ASSET_ID = l_asset_hdr_rec.asset_id
3914: AND BOOK_TYPE_CODE = l_asset_hdr_rec.book_type_code;

Line 3964: DELETE FROM FA_ADJUSTMENTS

3960: l_asset_hdr_rec.asset_id, p_log_level_rec => p_log_level_rec);
3961: end if;
3962:
3963: -- +++++ Remove group expense rows +++++
3964: DELETE FROM FA_ADJUSTMENTS
3965: WHERE ASSET_ID = l_asset_hdr_rec.asset_id
3966: AND BOOK_TYPE_CODE = l_asset_hdr_rec.book_type_code
3967: AND TRANSACTION_HEADER_ID = l_trans_rec.member_transaction_header_id
3968: AND SOURCE_TYPE_CODE = 'DEPRECIATION'

Line 4793: FROM FA_ADJUSTMENTS AJ

4789: AND set_of_books_id = p_asset_hdr_rec.set_of_books_id;
4790:
4791: CURSOR C_GET_GROUP_RSV_RET IS
4792: SELECT sum(decode(AJ.DEBIT_CREDIT_FLAG, 'CR', -1, 1)*AJ.ADJUSTMENT_AMOUNT)
4793: FROM FA_ADJUSTMENTS AJ
4794: WHERE AJ.ASSET_ID = p_asset_hdr_rec.asset_id
4795: AND AJ.BOOK_TYPE_CODE = p_asset_hdr_rec.book_type_code
4796: AND AJ.TRANSACTION_HEADER_ID = p_trans_rec.transaction_header_id;
4797:

Line 4800: FROM FA_ADJUSTMENTS AJ

4796: AND AJ.TRANSACTION_HEADER_ID = p_trans_rec.transaction_header_id;
4797:
4798: CURSOR C_MC_GET_GROUP_RSV_RET IS
4799: SELECT sum(decode(AJ.DEBIT_CREDIT_FLAG, 'CR', -1, 1)*AJ.ADJUSTMENT_AMOUNT)
4800: FROM FA_ADJUSTMENTS AJ
4801: WHERE AJ.ASSET_ID = p_asset_hdr_rec.asset_id
4802: AND AJ.BOOK_TYPE_CODE = p_asset_hdr_rec.book_type_code
4803: AND AJ.TRANSACTION_HEADER_ID = p_trans_rec.transaction_header_id;
4804:

Line 4961: , fa_adjustments aj

4957: , bk.adjusted_recoverable_cost
4958: , sum(aj.adjustment_amount)
4959: from fa_transaction_headers th -- member
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

Line 5054: , fa_adjustments aj

5050: CURSOR c_ret_adj_count IS
5051: select count(1)
5052: from fa_transaction_headers th -- member
5053: , fa_transaction_headers gth -- group
5054: , fa_adjustments aj
5055: where th.book_type_code = p_asset_hdr_rec.book_type_code
5056: and th.source_transaction_header_id = gth.transaction_header_id
5057: and gth.book_type_code = p_asset_hdr_rec.book_type_code
5058: and gth.member_transaction_header_id = p_mem_ret_thid

Line 5422: -- call faxinaj to create records in FA_ADJUSTMENTS table

5418:
5419:
5420: l_loc := 'Before ADJ LOOP';
5421: -- Prepare non-common FA_ADJUST_TYPE_PKG.FA_ADJ_ROW_STRUCT parameters and
5422: -- call faxinaj to create records in FA_ADJUSTMENTS table
5423: if (p_log_level_rec.statement_level) then
5424: fa_debug_pkg.add(l_calling_fn, 'Before ADJ LOOP', t_asset_id(1));
5425: fa_debug_pkg.add(l_calling_fn, 't_asset_id.last', t_asset_id.last, p_log_level_rec => p_log_level_rec);
5426: end if;

Line 6479: UPDATE FA_ADJUSTMENTS

6475: SET ADJUSTED_COST = ADJUSTED_COST - ( l_reallocate_amount * sign(p_reserve_amount) * -1 )
6476: WHERE TRANSACTION_HEADER_ID_IN = l_last_thid
6477: AND set_of_books_id = p_asset_hdr_rec.set_of_books_id;
6478: else
6479: UPDATE FA_ADJUSTMENTS
6480: SET ADJUSTMENT_AMOUNT = ADJUSTMENT_AMOUNT + l_reallocate_amount
6481: WHERE ASSET_ID = l_last_asset_id
6482: AND BOOK_TYPE_CODE = p_asset_hdr_rec.book_type_code
6483: AND TRANSACTION_HEADER_ID = l_last_thid

Line 6485: FROM FA_ADJUSTMENTS

6481: WHERE ASSET_ID = l_last_asset_id
6482: AND BOOK_TYPE_CODE = p_asset_hdr_rec.book_type_code
6483: AND TRANSACTION_HEADER_ID = l_last_thid
6484: AND DISTRIBUTION_ID = (SELECT MIN(DISTRIBUTION_ID)
6485: FROM FA_ADJUSTMENTS
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:

Line 6608: UPDATE FA_ADJUSTMENTS

6604: if (p_log_level_rec.statement_level) then
6605: fa_debug_pkg.add(l_calling_fn, 'Rounding 2 : adj rallocate ',(l_reallocate_amount * sign(p_reserve_amount) * -1),p_log_level_rec);
6606: end if;
6607:
6608: UPDATE FA_ADJUSTMENTS
6609: SET ADJUSTMENT_AMOUNT = ADJUSTMENT_AMOUNT + l_reallocate_amount
6610: WHERE ASSET_ID = t_asset_id(i)
6611: AND BOOK_TYPE_CODE = p_asset_hdr_rec.book_type_code
6612: AND TRANSACTION_HEADER_ID = t_thid(i)

Line 6614: FROM FA_ADJUSTMENTS

6610: WHERE ASSET_ID = t_asset_id(i)
6611: AND BOOK_TYPE_CODE = p_asset_hdr_rec.book_type_code
6612: AND TRANSACTION_HEADER_ID = t_thid(i)
6613: AND DISTRIBUTION_ID = (SELECT MIN(DISTRIBUTION_ID)
6614: FROM FA_ADJUSTMENTS
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:

Line 6667: UPDATE FA_ADJUSTMENTS

6663: SET ADJUSTED_COST = RECOVERABLE_COST - ADJUSTED_RECOVERABLE_COST
6664: WHERE TRANSACTION_HEADER_ID_IN = t_thid(i)
6665: AND set_of_books_id = p_asset_hdr_rec.set_of_books_id;
6666: else
6667: UPDATE FA_ADJUSTMENTS
6668: SET ADJUSTMENT_AMOUNT = ADJUSTMENT_AMOUNT + t_adjusted_cost(i)
6669: WHERE ASSET_ID = t_asset_id(i)
6670: AND BOOK_TYPE_CODE = p_asset_hdr_rec.book_type_code
6671: AND TRANSACTION_HEADER_ID = t_thid(i)

Line 6673: FROM FA_ADJUSTMENTS

6669: WHERE ASSET_ID = t_asset_id(i)
6670: AND BOOK_TYPE_CODE = p_asset_hdr_rec.book_type_code
6671: AND TRANSACTION_HEADER_ID = t_thid(i)
6672: AND DISTRIBUTION_ID = (SELECT MIN(DISTRIBUTION_ID)
6673: FROM FA_ADJUSTMENTS
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: