-- ----------------------------------------------------------------------------------------------------
-- Purpose : R12 Fixed Asset details
-- Release Date: 13.Jul.2012
-- Created by : Siri
-- .....
-- ----------------------------------------------------------------------------------------------------
select fab.asset_id asset_id,
fab.asset_number asset_number,
fal.description asset_description,
fab.current_units units,
(select sum(fixed_assets_cost)
from apps.fa_invoice_details_v
where asset_id = fab.asset_id) cost,
fab.serial_number serial_number,
fab.model_number model_number,
fab.tag_number tag_number,
(select ASSIGNMENT_NUMBER
from apps.per_all_assignments_f
where person_id = fdh.assigned_to
and trunc(sysdate) between effective_start_date and effective_end_date
) assigned_to
from apps.fa_additions_b fab,
apps.fa_distribution_history fdh,
apps.fa_additions_tl fal
where 1=1
and fab.asset_id = fdh.asset_id
and fal.asset_id = fab.asset_id
and trunc(sysdate) between fdh.date_effective and nvl(fdh.date_ineffective,sysdate+1);
-- ----------------------------------------------------------------------------------------------------
No comments:
Post a Comment