feat: 财务管理到账开票导出增加打包项目
This commit is contained in:
+29
@@ -550,6 +550,35 @@
|
|||||||
<if test="payCommonProject.affirmIncome != null">
|
<if test="payCommonProject.affirmIncome != null">
|
||||||
AND tcp.affirm_income = #{payCommonProject.affirmIncome}
|
AND tcp.affirm_income = #{payCommonProject.affirmIncome}
|
||||||
</if>
|
</if>
|
||||||
|
<!-- 打包项目-->
|
||||||
|
UNION ALL
|
||||||
|
select ppc.id,ppc.company_temporary_name AS charge_project,22 AS charge_use,ppc.pack_principal_id as principal_id,su.realname AS principal_name,ppc.company_id as charge_company_id,ppc.company_temporary_name as charge_company_temporary_name,ppc.receivable_amount,ppc.paid_amount,
|
||||||
|
ppc.need_invoice,NULL AS pack,ppc.in_account,ppc.make_invoice,NULL AS mail,ppc.create_time,8 AS projectType,ppc.invoice_amount,ppc.mail_contacts_id,'' AS register_check_result,ppc.pack_contact_temporary_name as contacts_temporary_name,NULL AS payment_status,ppc.company_temporary_id,ppc.confirm_amount,ppc.income_affirm AS affirm_income
|
||||||
|
from pay_pack_company ppc
|
||||||
|
left join sys_user su on ppc.pack_principal_id = su.id
|
||||||
|
left join pay_company_management on ppc.company_id = pay_company_management.id
|
||||||
|
where
|
||||||
|
ppc.receivable_amount <![CDATA[<>]]> 0
|
||||||
|
and ppc.receivable_amount is not null
|
||||||
|
<if test="payCommonProject.principalId != null and payCommonProject.principalId != ''">
|
||||||
|
AND ppc.pack_principal_id = #{payCommonProject.principalId}
|
||||||
|
</if>
|
||||||
|
<if test="payCommonProject.chargeCompanyTemporaryName != null and payCommonProject.chargeCompanyTemporaryName != ''">
|
||||||
|
AND ppc.company_temporary_name like concat('%',concat(#{payCommonProject.chargeCompanyTemporaryName},'%'))
|
||||||
|
</if>
|
||||||
|
<!-- 来款未开票 -->
|
||||||
|
<if test='paidInvoicStatus != null and paidInvoicStatus == "1"'>
|
||||||
|
AND (ppc.paid_amount <![CDATA[>]]> ppc.invoice_amount or
|
||||||
|
(ppc.paid_amount is not null and ppc.paid_amount !=0 and ppc.invoice_amount is null))
|
||||||
|
</if>
|
||||||
|
<!-- 开票未来款 -->
|
||||||
|
<if test='paidInvoicStatus != null and paidInvoicStatus == "2"'>
|
||||||
|
AND (ppc.paid_amount <![CDATA[<]]> ppc.invoice_amount or
|
||||||
|
(ppc.paid_amount is null and ppc.invoice_amount is not null and ppc.invoice_amount !=0))
|
||||||
|
</if>
|
||||||
|
<if test="payCommonProject.affirmIncome != null">
|
||||||
|
AND ppc.income_affirm = #{payCommonProject.affirmIncome}
|
||||||
|
</if>
|
||||||
)p
|
)p
|
||||||
LEFT JOIN pay_payment_record ppr ON ppr.project_id = p.id
|
LEFT JOIN pay_payment_record ppr ON ppr.project_id = p.id
|
||||||
<where>
|
<where>
|
||||||
|
|||||||
Reference in New Issue
Block a user