DBA Data[Home] [Help]

APPS.JA_AU_FA_BAL_CHG dependencies on JA_AU_SRW_TAX_DEPRN_TMP

Line 102: delete from ja_au_srw_tax_deprn_tmp ;

98:
99:
100: begin
101: -- Clean up the temporary Table
102: delete from ja_au_srw_tax_deprn_tmp ;
103:
104: -- DBMS_OUTPUT.PUT_LINE ('Starting');
105:
106: -- Fetch the first category ID

Line 135: insert into ja_au_srw_tax_deprn_tmp

131:
132:
133: /* Select candidate records between selected periods */
134:
135: insert into ja_au_srw_tax_deprn_tmp
136: ( asset_id,
137: asset_number,
138: asset_desc,
139: category_id,

Line 224: update ja_au_srw_tax_deprn_tmp t

220: -- DBMS_OUTPUT.PUT_LINE ('Found '||to_char(SQL%ROWCOUNT)||' Candidate Records');
221:
222: /* Select the maximum date retired prior to the end of the chosen interval */
223:
224: update ja_au_srw_tax_deprn_tmp t
225: set date_retired =
226: (select max(r.date_retired)
227: from fa_transaction_headers th,
228: fa_retirements r

Line 245: delete from ja_au_srw_tax_deprn_tmp t

241:
242: /* Delete records where the maximum date retired is less than the start of the
243: interval */
244:
245: delete from ja_au_srw_tax_deprn_tmp t
246: where t.date_retired < v_from_cal_date;
247:
248: /* Select the assets that were retired in the interval and calculate the net
249: book value */

Line 251: update ja_au_srw_tax_deprn_tmp t

247:
248: /* Select the assets that were retired in the interval and calculate the net
249: book value */
250:
251: update ja_au_srw_tax_deprn_tmp t
252: set (date_retired, net_book_value) =
253: (select max(r.date_retired), sum(nvl(r.nbv_retired,0))
254: from fa_transaction_headers th,
255: fa_retirements r

Line 271: update ja_au_srw_tax_deprn_tmp t

267: and r.transaction_header_id_in = th.transaction_header_id);
268:
269: /* Select the depreciation reserve at the start of the interval */
270:
271: update ja_au_srw_tax_deprn_tmp t
272: set deprn_rsrve_start =
273: (select deprn_reserve
274: from fa_deprn_summary ds
275: where ds.asset_id = t.asset_id

Line 289: update ja_au_srw_tax_deprn_tmp t

285: and ds.book_type_code = v_book_type_code);
286:
287: /* Select the depreciation reserve at the end of the interval */
288:
289: update ja_au_srw_tax_deprn_tmp t
290: set deprn_rsrve_end =
291: (select deprn_reserve
292: from fa_deprn_summary ds
293: where ds.asset_id = t.asset_id

Line 308: update ja_au_srw_tax_deprn_tmp t

304: and ds.book_type_code = v_book_type_code);
305:
306: /* Calculate the depreciation over the interval */
307:
308: update ja_au_srw_tax_deprn_tmp t
309: set deprn_amount =
310: (select sum(ds.deprn_amount)
311: from fa_deprn_summary ds,
312: fa_deprn_periods dp

Line 322: update ja_au_srw_tax_deprn_tmp t

318:
319: -- Select the assets that were entered in the system
320: -- between the given periods
321:
322: update ja_au_srw_tax_deprn_tmp t
323: set addition_date =
324: (select th.date_effective
325: from fa_transaction_headers th
326: where th.asset_id = t.asset_id

Line 332: update ja_au_srw_tax_deprn_tmp t

328: and th.transaction_type_code = 'ADDITION'
329: and th.date_effective between v_from_date and v_to_date);
330:
331: -- Select the balancing charges applied to each asset
332: update ja_au_srw_tax_deprn_tmp t
333: set bal_chg_applied =
334: (select sum(nvl(ap.bal_chg_applied,0))
335: from ja_au_bal_chg_applied ap
336: where ap.asset_id = t.asset_id