|
|
@ -13,8 +13,10 @@ |
|
|
|
select count(1) totalCount, ifnull(sum(invoice_amount), 0) totalAmount, |
|
|
|
select count(1) totalCount, ifnull(sum(invoice_amount), 0) totalAmount, |
|
|
|
ifnull(sum(dk_tax_amount), 0) totalTax |
|
|
|
ifnull(sum(dk_tax_amount), 0) totalTax |
|
|
|
FROM t_dx_record_invoice |
|
|
|
FROM t_dx_record_invoice |
|
|
|
WHERE valid='1' and invoice_type in ('01','03','08','14','31') AND invoice_status='0' AND |
|
|
|
WHERE valid='1' |
|
|
|
rzh_yesorno='1' |
|
|
|
and (invoice_type in('01','03','08','14','31','283','161','183','185') or (invoice_type ='32' and t.lq_tdyslxDm='08')) |
|
|
|
|
|
|
|
AND invoice_status='0' |
|
|
|
|
|
|
|
AND rzh_yesorno='1' |
|
|
|
<if test="skssq !=null and skssq != ''"> |
|
|
|
<if test="skssq !=null and skssq != ''"> |
|
|
|
and rzh_belong_date = #{skssq} |
|
|
|
and rzh_belong_date = #{skssq} |
|
|
|
</if> |
|
|
|
</if> |
|
|
@ -54,9 +56,11 @@ |
|
|
|
|
|
|
|
|
|
|
|
<select id="getTotalOutTax" resultType="Double" databaseId="mysql"> |
|
|
|
<select id="getTotalOutTax" resultType="Double" databaseId="mysql"> |
|
|
|
SELECT ifnull(sum(out_tax_amount), 0) FROM t_dx_record_invoice |
|
|
|
SELECT ifnull(sum(out_tax_amount), 0) FROM t_dx_record_invoice |
|
|
|
WHERE valid='1' and invoice_type in ('01','03','08','14','31') AND invoice_status='0' AND |
|
|
|
WHERE valid='1' |
|
|
|
rzh_yesorno='1' AND |
|
|
|
and (invoice_type in('01','03','08','14','31','283','161','183','185') or (invoice_type ='32' and t.lq_tdyslxDm='08')) |
|
|
|
out_status in ('1','2') |
|
|
|
AND invoice_status='0' |
|
|
|
|
|
|
|
AND rzh_yesorno='1' |
|
|
|
|
|
|
|
AND out_status in ('1','2') |
|
|
|
<if test="skssq !=null and skssq != ''"> |
|
|
|
<if test="skssq !=null and skssq != ''"> |
|
|
|
and out_belong_date = #{skssq} |
|
|
|
and out_belong_date = #{skssq} |
|
|
|
</if> |
|
|
|
</if> |
|
|
@ -69,9 +73,11 @@ |
|
|
|
out_reason rzhDate, |
|
|
|
out_reason rzhDate, |
|
|
|
ifnull(sum(out_tax_amount), 0) tax |
|
|
|
ifnull(sum(out_tax_amount), 0) tax |
|
|
|
FROM t_dx_record_invoice |
|
|
|
FROM t_dx_record_invoice |
|
|
|
WHERE valid='1' and invoice_type in ('01','03','08','14','31') AND invoice_status='0' AND |
|
|
|
WHERE valid='1' |
|
|
|
rzh_yesorno='1' AND |
|
|
|
and (invoice_type in('01','03','08','14','31','283','161','183','185') or (invoice_type ='32' and t.lq_tdyslxDm='08')) |
|
|
|
out_status in ('1','2') |
|
|
|
AND invoice_status='0' |
|
|
|
|
|
|
|
AND rzh_yesorno='1' |
|
|
|
|
|
|
|
AND out_status in ('1','2') |
|
|
|
<if test="skssq !=null and skssq != ''"> |
|
|
|
<if test="skssq !=null and skssq != ''"> |
|
|
|
and out_belong_date = #{skssq} |
|
|
|
and out_belong_date = #{skssq} |
|
|
|
</if> |
|
|
|
</if> |
|
|
|