[Home] [Help]
450: -- a group reclass / member adjustment, etc inside
451: -- calc_fin_info when calling faxama/faxiat
452:
453: if (p_mrc_sob_type_code = 'R') then
454: delete from fa_adjustments_mrc_v
455: where asset_id = px_src_asset_hdr_rec.asset_id
456: and book_type_code = px_src_asset_hdr_rec.book_type_code
457: and transaction_header_id = px_src_trans_rec.transaction_header_id
458: and adjustment_type in ('EXPENSE', 'BONUS EXPENSE')
457: and transaction_header_id = px_src_trans_rec.transaction_header_id
458: and adjustment_type in ('EXPENSE', 'BONUS EXPENSE')
459: and source_type_code = 'DEPRECIATION';
460: else
461: delete from fa_adjustments
462: where asset_id = px_src_asset_hdr_rec.asset_id
463: and book_type_code = px_src_asset_hdr_rec.book_type_code
464: and transaction_header_id = px_src_trans_rec.transaction_header_id
465: and adjustment_type in ('EXPENSE', 'BONUS EXPENSE')
724: end if;
725:
726: if (l_group_reclass_code = 'NONE-GRP') then
727:
728: update fa_adjustments
729: set track_member_flag = null
730: where transaction_header_id = l_trans_rec.transaction_header_id
731: and book_type_code = p_asset_hdr_rec.book_type_code;
732:
741: and book_type_code = p_asset_hdr_rec.book_type_code
742: and transaction_type_code = 'TRANSFER'
743: and transaction_header_id > p_trans_rec.transaction_header_id;
744:
745: update fa_adjustments_mrc_v
746: set track_member_flag = null
747: where transaction_header_id = l_trans_rec.transaction_header_id
748: and book_type_code = p_asset_hdr_rec.book_type_code;
749:
902: -- a group reclass / member adjustment, etc inside
903: -- calc_fin_info when calling faxama/faxiat
904:
905: if (p_mrc_sob_type_code = 'R') then
906: delete from fa_adjustments_mrc_v
907: where asset_id = px_dest_asset_hdr_rec.asset_id
908: and book_type_code = px_dest_asset_hdr_rec.book_type_code
909: and transaction_header_id = px_dest_trans_rec.transaction_header_id
910: and adjustment_type in ('EXPENSE', 'BONUS EXPENSE')
909: and transaction_header_id = px_dest_trans_rec.transaction_header_id
910: and adjustment_type in ('EXPENSE', 'BONUS EXPENSE')
911: and source_type_code = 'DEPRECIATION';
912: else
913: delete from fa_adjustments
914: where asset_id = px_dest_asset_hdr_rec.asset_id
915: and book_type_code = px_dest_asset_hdr_rec.book_type_code
916: and transaction_header_id = px_dest_trans_rec.transaction_header_id
917: and adjustment_type in ('EXPENSE', 'BONUS EXPENSE')
1224: CURSOR c_get_exp_amount IS
1225: select NVL(SUM(DECODE(adj.debit_credit_flag,
1226: 'DR', adj.adjustment_amount,
1227: 'CR', -1 * adj.adjustment_amount)), 0)
1228: from fa_adjustments adj
1229: where adj.asset_id = p_asset_hdr_rec.asset_id
1230: and adj.book_type_code = p_asset_hdr_rec.book_type_code
1231: and adj.adjustment_type = 'EXPENSE'
1232: and adj.period_counter_created = p_period_rec.period_counter
1232: and adj.period_counter_created = p_period_rec.period_counter
1233: and adj.track_member_flag = 'Y'
1234: and adj.transaction_header_id = px_trans_rec.transaction_header_id;
1235: /* Bug 8237945 added above transaction_header_id condition. To get the backed out expense
1236: we need to consider the expense just inserted into fa_adjustments by this transaction*/
1237:
1238: --bug6983091: MRC: getting expense just backed out
1239: CURSOR c_get_mc_exp_amount IS
1240: select NVL(SUM(DECODE(adj.debit_credit_flag,
1239: CURSOR c_get_mc_exp_amount IS
1240: select NVL(SUM(DECODE(adj.debit_credit_flag,
1241: 'DR', adj.adjustment_amount,
1242: 'CR', -1 * adj.adjustment_amount)), 0)
1243: from fa_adjustments_mrc_v adj
1244: where adj.asset_id = p_asset_hdr_rec.asset_id
1245: and adj.book_type_code = p_asset_hdr_rec.book_type_code
1246: and adj.adjustment_type = 'EXPENSE'
1247: and adj.period_counter_created = p_period_rec.period_counter
1247: and adj.period_counter_created = p_period_rec.period_counter
1248: and adj.track_member_flag = 'Y'
1249: and adj.transaction_header_id = px_trans_rec.transaction_header_id;
1250: /* Bug 8237945 added above transaction_header_id condition. To get the backed out expense
1251: we need to consider the expense just inserted into fa_adjustments by this transaction*/
1252:
1253: l_calling_fn VARCHAR2(35) := 'fa_group_reclass_pvt.do_adjustment';
1254: grp_rec_err EXCEPTION;
1255:
1356: l_exp_adj.distribution_id := 0;
1357: l_exp_adj.mrc_sob_type_code := p_mrc_sob_type_code;
1358:
1359: -- most of the following logic was stolen from FAVGRCLB.pls (CRL)
1360: -- basically, derive the info for each insert into fa_adjustments
1361: -- based on the source / destination / asset type, etc
1362:
1363: -- set up the accounting related values in the adj_ptr
1364: if (p_src_dest = 'SOURCE') then
2202: cursor FA_ADJ_RESERVE is
2203: select sum(decode(adj.debit_credit_flag,
2204: 'DR',adj.adjustment_amount,
2205: 'CR', -1 * adj.adjustment_amount))
2206: from fa_adjustments adj
2207: where adj.book_type_code = h_book_type_code
2208: and adj.asset_id = h_member_asset_id
2209: and adj.adjustment_type = 'RESERVE'
2210: and adj.source_type_code = 'ADJUSTMENT'