|
|
|
@ -105,33 +105,13 @@ |
|
|
|
|
t.export_mark,t.inaccount_status,t.payment_status,DATE_FORMAT(t.payment_date,'%Y-%m-%d')payment_date,t.voucher_number,t.tax_rate |
|
|
|
|
from t_dx_record_invoice t |
|
|
|
|
WHERE t.invoice_date between #{kpksrq} and #{kpjsrq} |
|
|
|
|
and (t.invoice_type in('01','03','08','14','31','283','161','183','185') or (t.invoice_type ='32' and t.lq_tdyslxDm='08')) |
|
|
|
|
and t.invoice_type in ('01','03','08','14','31','283','161','183','185') |
|
|
|
|
and t.bdk_status in ('1','2') |
|
|
|
|
and t.export_mark = '0' |
|
|
|
|
and t.auth_status in ('2','3','4') |
|
|
|
|
and t.company = #{company} |
|
|
|
|
<if test="sign !='88'"> |
|
|
|
|
and t.gf_tax_no in |
|
|
|
|
<foreach collection="gfsh" index="index" item="item" open="(" separator="," close=")"> |
|
|
|
|
#{item} |
|
|
|
|
</foreach> |
|
|
|
|
</if> |
|
|
|
|
|
|
|
|
|
<if test="companyCode != null and companyCode != '' and companyCode != 'null' and companyCode == '99'"> |
|
|
|
|
and (t.comp_code in |
|
|
|
|
<foreach collection="companyCodes" index="index" item="companyCode" separator="," open="(" close=")"> |
|
|
|
|
#{companyCode} |
|
|
|
|
</foreach> |
|
|
|
|
or t.comp_code is null or t.comp_code = '' |
|
|
|
|
) |
|
|
|
|
</if> |
|
|
|
|
|
|
|
|
|
<if test="companyCode != null and companyCode != '99' and companyCode != '88' and companyCode != '' and companyCode != 'null'" > |
|
|
|
|
and t.comp_code = #{companyCode} |
|
|
|
|
</if> |
|
|
|
|
<if test="companyCode != null and companyCode != '' and companyCode == '88'"> |
|
|
|
|
and (t.comp_code = '' or t.comp_code is null) |
|
|
|
|
</if> |
|
|
|
|
and t.gf_tax_no = #{gfsh} |
|
|
|
|
and t.comp_code = #{companyCode} |
|
|
|
|
|
|
|
|
|
<if test="invoiceStatus != null and invoiceStatus != '' and invoiceStatus != 'null' "> |
|
|
|
|
and t.invoice_status = #{invoiceStatus} |
|
|
|
|