select
org.organization_id,
substr(p.organization_name,1,60) project_organization,
p.member_name project_member2,
i.invoice_status,
i.project_id||i.draft_invoice_num invoice,
i.invoice_currency_code,
i.project_id proj_id,
i.draft_invoice_num draft_num
-- PA_PAXPCIFS_XMLP_PKG.c_inv_amountformula(:C_inv_amount1, :C_inv_amount2, :C_inv_amount3) C_inv_amount,
-- PA_PAXPCIFS_XMLP_PKG.c_inv_countformula(:C_inv_count1, :C_inv_count2, :C_inv_count3) C_inv_count,
-- PA_PAXPCIFS_XMLP_PKG.c_amountformula(:C_amount1, :C_amount2, :C_amount3) C_amount,
-- PA_PAXPCIFS_XMLP_PKG.c_countformula(:C_count1, :C_count2, :C_count3) C_count
from
pa_org_reporting_view org,
pa_proj_members_view p,
pa_proj_invoices_view i
where p.organization_id = org.organization_id
and p.project_id = i.project_id
and p.member_person_id =
nvl(:project_member,p.member_person_id)
and p.project_role_type =
nvl(:PROJECT_ROLE_TYPE,'PROJECT MANAGER')
and nvl(trunc(i.creation_date),sysdate) between
nvl(:CREATION_DATE_FROM,
nvl(trunc(i.creation_date),sysdate-1)) and
nvl(:CREATION_DATE_TO,
nvl(trunc(i.creation_date),sysdate+1))
and :c_enter is null
ORDER BY 2 ASC,1 ASC,3 ASC,4 ASC,7 ASC,8 ASC,6 ASC,5 ASC |