Skip to content
Snippets Groups Projects

3

Merged jiangxiaoming requested to merge jiangxiaoming into dev
Compare and
1 file
+ 6
6
Compare changes
  • Side-by-side
  • Inline
@@ -33,15 +33,15 @@
left join t_invoice d on d.id=c.invoice_id and d.invoice_state='已开'
left join t_project_type h on h.id=a.project_type_id
left join (select a.* from (select distinct a.income_id,b.entry_type,a.id entry_bill_id, b.id entry_bill_flow_id
,b.voucher_id, '' voucher_state
,b.voucher_id, c.voucher_state
from t_entry_bill a left join
t_entry_bill_flow b on a.id=b.entry_id and a.available='Yes' and b.available='Yes'
t_entry_bill_flow b on a.id=b.entry_id -- and a.available='Yes' and b.available='Yes'
left join t_voucher c on c.id=b.voucher_id -- and c.voucher_state!='驳回'
where b.entry_type in('到款转暂存') )a
left join
(select distinct a.income_id,b.entry_type,a.id entry_bill_id, b.id entry_bill_flow_id
,b.voucher_id,c.voucher_state from t_entry_bill a left join
t_entry_bill_flow b on a.id=b.entry_id and a.available='Yes' and b.available='Yes'
t_entry_bill_flow b on a.id=b.entry_id -- and a.available='Yes' and b.available='Yes'
left join t_voucher c on c.id=b.voucher_id -- and c.voucher_state!='驳回'
where b.entry_type in('暂存转收入') ) b
on a.income_id=b.income_id where b.income_id is null
@@ -49,13 +49,13 @@
(select b.* from (select distinct a.income_id,b.entry_type,a.id entry_bill_id, b.id entry_bill_flow_id
,b.voucher_id,c.voucher_state from t_entry_bill a left join
t_entry_bill_flow b on a.id=b.entry_id and a.available='Yes' and b.available='Yes'
t_entry_bill_flow b on a.id=b.entry_id -- and a.available='Yes' and b.available='Yes'
left join t_voucher c on c.id=b.voucher_id -- and c.voucher_state!='驳回'
where b.entry_type in('到款转暂存') )a
left join
(select distinct a.income_id,b.entry_type,a.id entry_bill_id, b.id entry_bill_flow_id
,b.voucher_id,c.voucher_state from t_entry_bill a left join
t_entry_bill_flow b on a.id=b.entry_id and a.available='Yes' and b.available='Yes'
t_entry_bill_flow b on a.id=b.entry_id -- and a.available='Yes' and b.available='Yes'
left join t_voucher c on c.id=b.voucher_id -- and c.voucher_state!='驳回'
where b.entry_type in('暂存转收入') ) b
on a.income_id=b.income_id where b.income_id is not null )
@@ -63,7 +63,7 @@
(
select distinct a.income_id,b.entry_type,a.id entry_bill_id, b.id entry_bill_flow_id
,b.voucher_id,c.voucher_state from t_entry_bill a left join
t_entry_bill_flow b on a.id=b.entry_id and a.available='Yes' and b.available='Yes'
t_entry_bill_flow b on a.id=b.entry_id -- and a.available='Yes' and b.available='Yes'
left join t_voucher c on c.id=b.voucher_id -- and c.voucher_state!='驳回'
where b.entry_type in('到款转收入')
)