DBA Data[Home] [Help]

APPS.FA_GAINLOSS_UPD_PKG dependencies on FA_ADJUSTMENTS

Line 124: from fa_adjustments

120:
121: if nvl(ret.mrc_sob_type_code,'P') <> 'R' then
122: select count(*)
123: into l_balance_tfr_in_tax
124: from fa_adjustments
125: where book_type_code = RET.book
126: and asset_id = RET.asset_id
127: and transaction_header_id = l_id_out -- Corp's TRANSFER OUT THID
128: and source_type_code in ('TRANSFER', 'RETIREMENT')

Line 134: from fa_adjustments_mrc_v

130: and rownum = 1;
131: else
132: select count(*)
133: into l_balance_tfr_in_tax
134: from fa_adjustments_mrc_v
135: where book_type_code = RET.book
136: and asset_id = RET.asset_id
137: and transaction_header_id = l_id_out -- Corp's TRANSFER OUT THID
138: and source_type_code in ('TRANSFER', 'RETIREMENT') -- TRANSFER for part-ret, RETIREMENT for reinst of full retirement

Line 177: from fa_adjustments

173: and transaction_header_id_out is NULL
174: and rownum = 1
175: and distribution_id =
176: (select max(distribution_id)
177: from fa_adjustments
178: where book_type_code = RET.book
179: and asset_id = RET.asset_id
180: -- and source_type_code in ('ADDITION')
181: and adjustment_amount <> 0

Line 200: from fa_adjustments_mrc_v

196: and transaction_header_id_out is NULL
197: and rownum = 1
198: and distribution_id =
199: (select max(distribution_id)
200: from fa_adjustments_mrc_v
201: where book_type_code = RET.book
202: and asset_id = RET.asset_id
203: -- and source_type_code in ('ADDITION')
204: and adjustment_amount <> 0

Line 422: | FA_ADJUSTMENTS table. |

418: | FUNCTION |
419: | It calculates GAIN/LOSS, NBV_RETIRED, STL_DEPRN_AMOUNT. Update the |
420: | status in FA_RETIREMENTS table from 'PENDING' to 'PROCESSED'. It |
421: | also inserts GAIN/LOSS, PROCEEDS_OF_SALE, and COST_OF_REMOVAL to |
422: | FA_ADJUSTMENTS table. |
423: | |
424: | HISTORY 01/12/89 R Rumanang Created |
425: | 08/30/89 R Rumanang Updated to insert to |
426: | FA_ADJUSTMENTS. |

Line 426: | FA_ADJUSTMENTS. |

422: | FA_ADJUSTMENTS table. |
423: | |
424: | HISTORY 01/12/89 R Rumanang Created |
425: | 08/30/89 R Rumanang Updated to insert to |
426: | FA_ADJUSTMENTS. |
427: | 01/31/90 R Rumanang Insert PROCEEDS_OF_SALE to |
428: | ADJUSTMENT |
429: | 05/03/91 M Chan Rewrote for MPL 9 |
430: | 12/30/96 S Behura Rewriting in PL/SQL |

Line 569: from fa_adjustments adj

565: AND bc.book_class = 'TAX'
566: AND dist.BOOK_TYPE_CODE = bc.distribution_source_book
567: AND dist.transaction_header_id_in =
568: (select max(adj.transaction_header_id) -- get the latest THID in the same period that caused DIST ID to change
569: from fa_adjustments adj
570: where adj.book_type_code = RET.book
571: and adj.asset_id = RET.asset_id
572: and adj.source_type_code in ('RETIREMENT', 'TRANSFER') -- RETIREMENT: balance tfr for Reinstatement, TRANSFER: balance tfr for Retirement
573: and adj.period_counter_created = cpd_ctr

Line 607: FROM FA_ADJUSTMENTS

603: SELECT SUM(NVL(DECODE(DEBIT_CREDIT_FLAG,
604: 'CR', ADJUSTMENT_AMOUNT,
605: -1 * ADJUSTMENT_AMOUNT), 0)*
606: DECODE(ADJUSTMENT_TYPE, 'RESERVE', -1, 1))
607: FROM FA_ADJUSTMENTS
608: WHERE (DISTRIBUTION_ID = c_dist_id
609: OR DISTRIBUTION_ID = c_new_dist_id)
610: AND BOOK_TYPE_CODE = ret.book
611: AND PERIOD_COUNTER_CREATED = cpd_ctr

Line 624: FROM FA_ADJUSTMENTS_MRC_V

620: SELECT SUM(NVL(DECODE(DEBIT_CREDIT_FLAG,
621: 'CR', ADJUSTMENT_AMOUNT,
622: -1 * ADJUSTMENT_AMOUNT), 0)*
623: DECODE(ADJUSTMENT_TYPE, 'RESERVE', -1, 1))
624: FROM FA_ADJUSTMENTS_MRC_V
625: WHERE (DISTRIBUTION_ID = c_dist_id
626: OR DISTRIBUTION_ID = c_new_dist_id)
627: AND BOOK_TYPE_CODE = ret.book
628: AND PERIOD_COUNTER_CREATED = cpd_ctr

Line 651: from fa_adjustments

647: -- FA_RETIREMENT_PVT.Do_Retirement_in_CGL
648: --
649: CURSOR c_get_g_rsv_ret is
650: select adjustment_amount
651: from fa_adjustments
652: where asset_id = bk.group_asset_id
653: and book_type_code = ret.book
654: and transaction_header_id = ret.th_id_in
655: and adjustment_type = 'RESERVE';

Line 662: from fa_adjustments

658: select sum(decode(adjustment_type
659: ,'COST', decode(debit_credit_flag,'CR', nvl(adjustment_amount,0), -1 * nvl(adjustment_amount,0))
660: ,'RESERVE', decode(debit_credit_flag,'DR', -1 * nvl(adjustment_amount,0), nvl(adjustment_amount,0))
661: ,0))
662: from fa_adjustments
663: where asset_id = ret.asset_id
664: and book_type_code = ret.book
665: and transaction_header_id = ret.th_id_in
666: and source_type_code='RETIREMENT'

Line 1741: | FUNCTION Add a cost retired adjustment into FA_ADJUSTMENTS. Credit to |

1737:
1738: /*===========================================================================*
1739: | NAME fagpct |
1740: | |
1741: | FUNCTION Add a cost retired adjustment into FA_ADJUSTMENTS. Credit to |
1742: | the asset account. |
1743: | |
1744: | HISTORY 08/30/89 R Rumanang Created |
1745: | 05/03/91 M Chan Rewrote for MPL 9 |

Line 2007: | insert them into fa_adjustments table. |

2003: | |
2004: | Function |
2005: | This function is to calculate the back out deprn_expense, |
2006: | reval_expense, and reval_amort we have taken so far and |
2007: | insert them into fa_adjustments table. |
2008: | |
2009: | History 11/13/92 L. Sun Created |
2010: | |
2011: | 12/31/96 S. Behura Rewrote into PL/SQL |

Line 2205: fa_adjustments faadj

2201: FROM
2202: fa_distribution_history fadh,
2203: fa_deprn_detail fadd,
2204: fa_deprn_periods fadp,
2205: fa_adjustments faadj
2206: WHERE
2207: fadd.asset_id = h_asset_id
2208: AND fadd.distribution_id = fadh.distribution_id
2209: AND fadd.book_type_code = h_book

Line 2250: fa_adjustments faadj

2246: fadp.period_counter
2247: FROM
2248: fa_distribution_history fadh,
2249: fa_deprn_periods fadp,
2250: fa_adjustments faadj
2251: WHERE
2252: fadp.period_num = h_i
2253: AND fadp.book_type_code = h_book
2254: AND fadp.fiscal_year = h_current_fiscal_yr

Line 2306: fa_adjustments_mrc_v faadj

2302: FROM
2303: fa_distribution_history fadh,
2304: fa_deprn_detail_mrc_v fadd,
2305: fa_deprn_periods fadp,
2306: fa_adjustments_mrc_v faadj
2307: WHERE
2308: fadd.asset_id = h_asset_id
2309: AND fadd.distribution_id = fadh.distribution_id
2310: AND fadd.book_type_code = h_book

Line 2351: fa_adjustments_mrc_v faadj

2347: fadp.period_counter
2348: FROM
2349: fa_distribution_history fadh,
2350: fa_deprn_periods fadp,
2351: fa_adjustments_mrc_v faadj
2352: WHERE
2353: fadp.period_num = h_i
2354: AND fadp.book_type_code = h_book
2355: AND fadp.fiscal_year = h_current_fiscal_yr

Line 2521: fa_adjustments faadj

2517: SELECT count(*)
2518: INTO h_ret_count
2519: FROM
2520: fa_deprn_periods fadp,
2521: fa_adjustments faadj
2522: WHERE
2523: fadp.period_num = h_i
2524: AND fadp.book_type_code = h_book
2525: AND fadp.fiscal_year = h_current_fiscal_yr

Line 2537: fa_adjustments faadj

2533: SELECT count(*)
2534: INTO h_adj_count
2535: FROM
2536: fa_deprn_periods fadp,
2537: fa_adjustments faadj
2538: WHERE
2539: fadp.period_num = h_i
2540: AND fadp.book_type_code = h_book
2541: AND fadp.fiscal_year = h_current_fiscal_yr

Line 2555: fa_adjustments_mrc_v faadj

2551: SELECT count(*)
2552: INTO h_ret_count
2553: FROM
2554: fa_deprn_periods fadp,
2555: fa_adjustments_mrc_v faadj
2556: WHERE
2557: fadp.period_num = h_i
2558: AND fadp.book_type_code = h_book
2559: AND fadp.fiscal_year = h_current_fiscal_yr

Line 2571: fa_adjustments_mrc_v faadj

2567: SELECT count(*)
2568: INTO h_adj_count
2569: FROM
2570: fa_deprn_periods fadp,
2571: fa_adjustments_mrc_v faadj
2572: WHERE
2573: fadp.period_num = h_i
2574: AND fadp.book_type_code = h_book
2575: AND fadp.fiscal_year = h_current_fiscal_yr

Line 2817: fa_adjustments adj,

2813:
2814: SELECT sum(adjustment_amount)--bug fix 3905436
2815: INTO h_adj_exp_row
2816: FROM
2817: fa_adjustments adj,
2818: fa_deprn_periods dp,
2819: fa_transaction_headers th
2820: WHERE
2821: th.asset_id = h_asset_id

Line 2899: fa_adjustments adj,

2895:
2896: SELECT sum(adjustment_amount), max(th.transaction_header_id)
2897: INTO h_adj_exp_row, h_old_reinst_trx_id
2898: FROM
2899: fa_adjustments adj,
2900: fa_deprn_periods dp,
2901: fa_transaction_headers th
2902: WHERE
2903: th.asset_id = h_asset_id

Line 3152: * in fa_deprn_detail and adjustment_amount in fa_adjustments

3148: * add to the total backup deprn. The following was required as
3149: * fix for 807256. May not be the most elegant but it works
3150: * without significant redesign of farboe. Always adding
3151: * h_deprn_amount which was the difference between deprn_amount
3152: * in fa_deprn_detail and adjustment_amount in fa_adjustments
3153: * does not work for all the cases. Instead the following
3154: * conditional logic adds the amounts correctly. SNARAYAN
3155: */
3156:

Line 3888: | the FA_ADJUSTMENTS table. |

3884: | FUNCTION |
3885: | |
3886: | This function figures out how much depreciation expense needs to be |
3887: | allocated to each cost center (distribution). It inserts the amount into |
3888: | the FA_ADJUSTMENTS table. |
3889: | If the number of periods to be catchup is negative or the |
3890: | DEPRECIATE_LAST_YEAR_FLAG is set to 'NO', we need to back out depreciation|
3891: | When the flag is set to NO, we need to back out the whole depreciation |
3892: | taken so far this year. |

Line 3897: | 8/24/89 R Rumanang Insert to FA_ADJUSTMENTS |

3893: | |
3894: | |
3895: | HISTORY 1/12/89 R Rumanang Created |
3896: | 6/23/89 R Rumanang Standarized |
3897: | 8/24/89 R Rumanang Insert to FA_ADJUSTMENTS |
3898: | 04/15/91 M Chan Rewritten for MPL 9 |
3899: | 01/02/96 S Behura Rewritten into PL/SQL |
3900: *===========================================================================*/
3901:

Line 4350: -- insert expense into fa_adjustments

4346: end if;
4347: end if;
4348:
4349:
4350: -- insert expense into fa_adjustments
4351: if (NOT FA_INS_ADJUST_PKG.faxinaj(adj_row,
4352: X_last_update_date,
4353: X_last_updated_by,
4354: X_last_update_login

Line 4569: FROM FA_ADJUSTMENTS faadj

4565: if (ret.mrc_sob_type_code <> 'R') then
4566: begin
4567: SELECT SUM(faadj.adjustment_amount)
4568: INTO h_deprn_amt
4569: FROM FA_ADJUSTMENTS faadj
4570: WHERE
4571: faadj.transaction_header_id = h_th_id_in
4572: AND faadj.source_type_code = 'RETIREMENT'
4573: AND faadj.adjustment_type = 'EXPENSE'

Line 4593: FROM FA_ADJUSTMENTS_MRC_V faadj

4589:
4590: begin
4591: SELECT SUM(faadj.adjustment_amount)
4592: INTO h_deprn_amt
4593: FROM FA_ADJUSTMENTS_MRC_V faadj
4594: WHERE
4595: faadj.transaction_header_id = h_th_id_in
4596: AND faadj.source_type_code = 'RETIREMENT'
4597: AND faadj.adjustment_type = 'EXPENSE'

Line 4620: FROM FA_ADJUSTMENTS faadj

4616: if (ret.mrc_sob_type_code <> 'R') then
4617: begin
4618: SELECT SUM(faadj.adjustment_amount)
4619: INTO h_bonus_deprn_amt
4620: FROM FA_ADJUSTMENTS faadj
4621: WHERE
4622: faadj.transaction_header_id = h_th_id_in
4623: AND faadj.source_type_code = 'RETIREMENT'
4624: AND faadj.adjustment_type = 'BONUS EXPENSE'

Line 4642: FROM FA_ADJUSTMENTS_MRC_V faadj

4638: else
4639: begin
4640: SELECT SUM(faadj.adjustment_amount)
4641: INTO h_bonus_deprn_amt
4642: FROM FA_ADJUSTMENTS_MRC_V faadj
4643: WHERE
4644: faadj.transaction_header_id = h_th_id_in
4645: AND faadj.source_type_code = 'RETIREMENT'
4646: AND faadj.adjustment_type = 'BONUS EXPENSE'

Line 4675: FROM FA_ADJUSTMENTS faadj

4671: if (ret.mrc_sob_type_code <> 'R') then
4672: begin
4673: SELECT SUM(faadj.adjustment_amount)
4674: INTO h_reval_deprn_amt
4675: FROM FA_ADJUSTMENTS faadj
4676: WHERE
4677: faadj.transaction_header_id = h_th_id_in
4678: AND faadj.source_type_code = 'RETIREMENT'
4679: AND faadj.adjustment_type = 'REVAL EXPENSE'

Line 4693: FROM FA_ADJUSTMENTS_MRC_V faadj

4689: else
4690: begin
4691: SELECT SUM(faadj.adjustment_amount)
4692: INTO h_reval_deprn_amt
4693: FROM FA_ADJUSTMENTS_MRC_V faadj
4694: WHERE
4695: faadj.transaction_header_id = h_th_id_in
4696: AND faadj.source_type_code = 'RETIREMENT'
4697: AND faadj.adjustment_type = 'REVAL EXPENSE'

Line 4723: FROM FA_ADJUSTMENTS faadj

4719: if (ret.mrc_sob_type_code <> 'R') then
4720: begin
4721: SELECT SUM(faadj.adjustment_amount)
4722: INTO h_reval_amort
4723: FROM FA_ADJUSTMENTS faadj
4724: WHERE
4725: faadj.transaction_header_id = h_th_id_in
4726: AND faadj.source_type_code = 'RETIREMENT'
4727: AND faadj.adjustment_type = 'REVAL AMORT'

Line 4741: FROM FA_ADJUSTMENTS_MRC_V faadj

4737: else
4738: begin
4739: SELECT SUM(faadj.adjustment_amount)
4740: INTO h_reval_amort
4741: FROM FA_ADJUSTMENTS_MRC_V faadj
4742: WHERE
4743: faadj.transaction_header_id = h_th_id_in
4744: AND faadj.source_type_code = 'RETIREMENT'
4745: AND faadj.adjustment_type = 'REVAL AMORT'

Line 4777: | FUNCTION Calculate reserve retired and insert it into FA_ADJUSTMENTS. |

4773:
4774: /*===========================================================================*
4775: | NAME fagprv |
4776: | |
4777: | FUNCTION Calculate reserve retired and insert it into FA_ADJUSTMENTS. |
4778: | It returns the current depreciation reserve before adjusted. |
4779: | |
4780: | HISTORY 08/30/89 R Rumanang Created |
4781: | 11/21/89 R Rumanang Put distribution_id in adjustments |

Line 5387: element => 'Insert fa_adjustments in fagprv2,accnt_type',

5383:
5384: if p_log_level_rec.statement_level then
5385: fa_debug_pkg.add
5386: (fname => l_calling_fn,
5387: element => 'Insert fa_adjustments in fagprv2,accnt_type',
5388: value => adj_row.account_type
5389: ,p_log_level_rec => p_log_level_rec);
5390: end if;
5391: