Commit 220174a9 authored by 陆正友's avatar 陆正友

进项发票查询数据更改

parent eac1c7a1
......@@ -23,12 +23,40 @@
where c.data_class = 'NORMAL'
and c.contract_status IN
('REPURING', 'ETING', 'INCEPT', 'PENDING')
and c.business_type <> 'LEASEBACK'
and c.business_type not in ('LEASEBACK' , 'LEASEOPERAT')
and not exists
(select 1
from acp_invoice_ln an
where an.contract_id = c.contract_id
and an.confirmation_status in ('APPROVING', 'APPROVED'))
union
select c.contract_id,
c.contract_number,
c.contract_name,
c.business_type,
c.search_term_1,
(SELECT description
FROM HLS_BUSINESS_TYPE_V a
WHERE a.business_type = c.business_type) business_type_n
from con_contract c,
con_contract_lease_item ci,
prj_project_lease_item pi,
prj_project pp
where c.contract_id = ci.contract_id
and ci.project_lease_item_id = pi.project_lease_item_id
and pi.source_project_id = pp.project_id
and c.data_class = 'NORMAL'
and c.contract_id =
con_contract_pkg.get_first_contract_id(pp.project_id)
and c.contract_status IN
('REPURING', 'ETING', 'INCEPT', 'PENDING')
and c.business_type = 'LEASEOPERAT'
and not exists
(select 1
from acp_invoice_ln an
where an.contract_id = c.contract_id
and an.confirmation_status in ('APPROVING', 'APPROVED'))) V
#WHERE_CLAUSE#
]]></bm:query-sql>
</bm:operation>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment