demand: 发票作废联调
This commit is contained in:
parent
d7b4cb4323
commit
422c20509d
@ -139,8 +139,25 @@
|
||||
and rel.apply_seq_no = i.apply_seq_no
|
||||
and b.cust_no = #{params.custNo})
|
||||
</if>
|
||||
<if test="params.privSiteCode != null and params.privSiteCode != ''">
|
||||
and c.apply_site_code = #{params.privSiteCode}
|
||||
<if test="params.privSiteCode != null and params.privSiteCode != '88888'">
|
||||
|
||||
and EXISTS(
|
||||
select 1 from emis_settle_bill x2,emis_settle_invoice_bill_rel x3
|
||||
where x2.del_flag = '0' and x3.del_flag = '0'
|
||||
and i.apply_seq_no=x3.apply_seq_no and x2.settle_bill_no=x3.settle_bill_no
|
||||
AND (
|
||||
x2.salesmen = #{params.privEmpName}
|
||||
OR x2.payee = #{params.privEmpName}
|
||||
OR x2.salesmen IN (
|
||||
SELECT salesmen
|
||||
FROM emis_salesmen_rel esr
|
||||
where esr.del_flag='0' and esr.bl_open='1'
|
||||
and now() <![CDATA[ >= ]]> esr.start_date and now() <![CDATA[ <= ]]> esr.end_date
|
||||
and esr.sales_ass = #{params.privEmpName}
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
</if>
|
||||
</where>
|
||||
group by c.id, c.invoice_id, c.apply_seq_no, c.apply_date, c.apply_reason, c.apply_text_url,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user