|
@@ -335,8 +335,8 @@
|
|
|
a.program_id,
|
|
a.program_id,
|
|
|
pr.is_pre_invoice as isPreInvoice,
|
|
pr.is_pre_invoice as isPreInvoice,
|
|
|
a.type as 'recordType'
|
|
a.type as 'recordType'
|
|
|
- from cw_finance_invoice_base a
|
|
|
|
|
- left join cw_finance_invoice fi on a.invoice_id = fi.id
|
|
|
|
|
|
|
+ from cw_finance_invoice fi
|
|
|
|
|
+ left join cw_finance_invoice_base a on a.invoice_id = fi.id
|
|
|
left join cw_finance_invoice_detail cfid on cfid.invoice_id = fi.id and cfid.del_flag = '0'
|
|
left join cw_finance_invoice_detail cfid on cfid.invoice_id = fi.id and cfid.del_flag = '0'
|
|
|
left join sys_user su on fi.create_by_id = su.id and su.del_flag = '0'
|
|
left join sys_user su on fi.create_by_id = su.id and su.del_flag = '0'
|
|
|
left join sys_user su1 on fi.reconciliation_people = su1.id and su1.del_flag = '0'
|
|
left join sys_user su1 on fi.reconciliation_people = su1.id and su1.del_flag = '0'
|
|
@@ -403,8 +403,8 @@
|
|
|
when a.type = '2' then (select rpr.is_pre_invoice from cw_project_records rpr where id = (select project_id from cw_project_report where id = a.program_id))
|
|
when a.type = '2' then (select rpr.is_pre_invoice from cw_project_records rpr where id = (select project_id from cw_project_report where id = a.program_id))
|
|
|
when a.type = '4' then (select pr.is_pre_invoice from cw_project_records pr where pr.id = a.program_id)
|
|
when a.type = '4' then (select pr.is_pre_invoice from cw_project_records pr where pr.id = a.program_id)
|
|
|
else '' end ) as isPreInvoice
|
|
else '' end ) as isPreInvoice
|
|
|
- from cw_finance_invoice_base a
|
|
|
|
|
- left join cw_finance_invoice fi on a.invoice_id = fi.id
|
|
|
|
|
|
|
+ from cw_finance_invoice fi
|
|
|
|
|
+ left join cw_finance_invoice_base a on a.invoice_id = fi.id
|
|
|
left join cw_finance_invoice_detail cfid on cfid.invoice_id = fi.id and cfid.del_flag = '0'
|
|
left join cw_finance_invoice_detail cfid on cfid.invoice_id = fi.id and cfid.del_flag = '0'
|
|
|
left join sys_user su on fi.create_by_id = su.id and su.del_flag = '0'
|
|
left join sys_user su on fi.create_by_id = su.id and su.del_flag = '0'
|
|
|
left join sys_user_manage_office sumo on sumo.office_id = su.office_id
|
|
left join sys_user_manage_office sumo on sumo.office_id = su.office_id
|