|
|
@ -71,7 +71,7 @@ |
|
|
|
t.inaccount_status,t.payment_status,DATE_FORMAT(t.payment_date,'%Y-%m-%d')payment_date,t.settlement_no,t.ele_invoice_no |
|
|
|
t.inaccount_status,t.payment_status,DATE_FORMAT(t.payment_date,'%Y-%m-%d')payment_date,t.settlement_no,t.ele_invoice_no |
|
|
|
from t_dx_record_invoice t left join t_dx_tax_current c on t.gf_tax_no = c.taxno |
|
|
|
from t_dx_record_invoice t left join t_dx_tax_current c on t.gf_tax_no = c.taxno |
|
|
|
left join t_dx_dk_count d on c.taxno = d.taxno and c.current_tax_period = d.skssq |
|
|
|
left join t_dx_dk_count d on c.taxno = d.taxno and c.current_tax_period = d.skssq |
|
|
|
WHERE date_format(t.invoice_date,'%Y-%m-%d') between #{kpksrq} and #{kpjsrq} |
|
|
|
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') or (t.invoice_type ='32' and t.lq_tdyslxDm='08')) |
|
|
|
and t.rzh_yesorno = '0' |
|
|
|
and t.rzh_yesorno = '0' |
|
|
|
and t.auth_status in('0','5','6') |
|
|
|
and t.auth_status in('0','5','6') |
|
|
@ -81,14 +81,14 @@ |
|
|
|
and t.invoice_status in ('0','7') |
|
|
|
and t.invoice_status in ('0','7') |
|
|
|
and t.invoice_amount>0 |
|
|
|
and t.invoice_amount>0 |
|
|
|
and t.tax_amount>=0 |
|
|
|
and t.tax_amount>=0 |
|
|
|
and date_format(t.invoice_date,'%Y%m%d') between c.select_start_date and c.select_end_date |
|
|
|
and t.invoice_date between c.select_start_date and c.select_end_date |
|
|
|
and d.tj_status in('0','3') |
|
|
|
and d.tj_status in('0','3') |
|
|
|
</if> |
|
|
|
</if> |
|
|
|
|
|
|
|
|
|
|
|
<if test="sfkrz != '99' and sfkrz != null and sfkrz != '' and sfkrz != 'null' and sfkrz == '0'.toString()"> |
|
|
|
<if test="sfkrz != '99' and sfkrz != null and sfkrz != '' and sfkrz != 'null' and sfkrz == '0'.toString()"> |
|
|
|
and (t.invoice_status in ('1','2','3','4','8','80') or t.invoice_amount <0 or t.tax_amount <0 or |
|
|
|
and (t.invoice_status in ('1','2','3','4','8','80') or t.invoice_amount <0 or t.tax_amount <0 or |
|
|
|
date_format(t.invoice_date,'%Y%m%d') <= c.select_start_date or |
|
|
|
t.invoice_date <= c.select_start_date or |
|
|
|
date_format(t.invoice_date,'%Y%m%d') >= |
|
|
|
t.invoice_date >= |
|
|
|
c.select_end_date or d.tj_status in ('1','2')) |
|
|
|
c.select_end_date or d.tj_status in ('1','2')) |
|
|
|
|
|
|
|
|
|
|
|
</if> |
|
|
|
</if> |
|
|
@ -395,7 +395,7 @@ |
|
|
|
select count(1) hjsl,sum(t.invoice_amount)hjje,sum(t.tax_amount)hjse |
|
|
|
select count(1) hjsl,sum(t.invoice_amount)hjje,sum(t.tax_amount)hjse |
|
|
|
from t_dx_record_invoice t left join t_dx_tax_current c on t.gf_tax_no = c.taxno |
|
|
|
from t_dx_record_invoice t left join t_dx_tax_current c on t.gf_tax_no = c.taxno |
|
|
|
left join t_dx_dk_count d on c.taxno = d.taxno and c.current_tax_period = d.skssq |
|
|
|
left join t_dx_dk_count d on c.taxno = d.taxno and c.current_tax_period = d.skssq |
|
|
|
WHERE date_format(t.invoice_date,'%Y-%m-%d') between #{kpksrq} and #{kpjsrq} |
|
|
|
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') or (t.invoice_type ='32' and t.lq_tdyslxDm='08')) |
|
|
|
and t.rzh_yesorno = '0' |
|
|
|
and t.rzh_yesorno = '0' |
|
|
|
and t.auth_status in('0','5','6') |
|
|
|
and t.auth_status in('0','5','6') |
|
|
@ -408,14 +408,14 @@ |
|
|
|
and t.invoice_status in ('0','7') |
|
|
|
and t.invoice_status in ('0','7') |
|
|
|
and t.invoice_amount>0 |
|
|
|
and t.invoice_amount>0 |
|
|
|
and t.tax_amount>=0 |
|
|
|
and t.tax_amount>=0 |
|
|
|
and date_format(t.invoice_date,'%Y%m%d') between c.select_start_date and c.select_end_date |
|
|
|
and t.invoice_date between c.select_start_date and c.select_end_date |
|
|
|
and d.tj_status in('0','3') |
|
|
|
and d.tj_status in('0','3') |
|
|
|
</if> |
|
|
|
</if> |
|
|
|
|
|
|
|
|
|
|
|
<if test="sfkrz != '99' and sfkrz != null and sfkrz != '' and sfkrz != 'null' and sfkrz == '0'.toString()"> |
|
|
|
<if test="sfkrz != '99' and sfkrz != null and sfkrz != '' and sfkrz != 'null' and sfkrz == '0'.toString()"> |
|
|
|
and (t.invoice_status in ('1','2','3','4','8','80') or t.invoice_amount <0 or t.tax_amount <0 or |
|
|
|
and (t.invoice_status in ('1','2','3','4','8','80') or t.invoice_amount <0 or t.tax_amount <0 or |
|
|
|
date_format(t.invoice_date,'%Y%m%d') <= c.select_start_date or |
|
|
|
t.invoice_date <= c.select_start_date or |
|
|
|
date_format(t.invoice_date,'%Y%m%d') >= |
|
|
|
t.invoice_date >= |
|
|
|
c.select_end_date or d.tj_status in ('1','2')) |
|
|
|
c.select_end_date or d.tj_status in ('1','2')) |
|
|
|
|
|
|
|
|
|
|
|
</if> |
|
|
|
</if> |
|
|
|