fix: invoice, rental sql invoice tax value (#1250)
Reviewed-on: daoyoucloud/tachybase#1250 Co-authored-by: bai.zixv <bai.zixv@foxmail.com> Co-committed-by: bai.zixv <bai.zixv@foxmail.com>
This commit is contained in:
parent
7d7c4309f2
commit
e4166d7dec
@ -12,6 +12,10 @@ WITH RECURSIVE
|
|||||||
category
|
category
|
||||||
FROM
|
FROM
|
||||||
invoice_input
|
invoice_input
|
||||||
|
WHERE
|
||||||
|
"category" = '0'
|
||||||
|
-- 筛选出进项发票种类为 0-专用发票; 0-专用发票,1-普通发票;只有专用发票计入增值税计算
|
||||||
|
-- 完税凭证加入增值税计算 99-完税凭证
|
||||||
UNION ALL
|
UNION ALL
|
||||||
SELECT
|
SELECT
|
||||||
purchaser_id AS company_id, -- 完税凭证,同发票进项字段
|
purchaser_id AS company_id, -- 完税凭证,同发票进项字段
|
||||||
@ -44,7 +48,6 @@ WITH RECURSIVE
|
|||||||
WHERE
|
WHERE
|
||||||
"date" >= '2022-01-01' -- 筛选出日期在'2022-01-01'之后的数据
|
"date" >= '2022-01-01' -- 筛选出日期在'2022-01-01'之后的数据
|
||||||
AND "state" = '1' -- 筛选出所有状态为正常的记录, 正常-1,作废-2
|
AND "state" = '1' -- 筛选出所有状态为正常的记录, 正常-1,作废-2
|
||||||
AND "category" = '0' -- 筛选出进项发票种类为 0-专用发票; 0-专用发票,1-普通发票;只有专用发票计入增值税计算
|
|
||||||
GROUP BY
|
GROUP BY
|
||||||
company_id,
|
company_id,
|
||||||
"MONTH"
|
"MONTH"
|
||||||
|
Loading…
Reference in New Issue
Block a user