fix: sql, view_invoices_tax, convert the month of result to utc (#859)
1. 将视图的返回结果日期, 统一为utc时间, 消除日期歧义. 2. 明确指出视图返回字段. 3. 视图结果,按照业务习惯,先按照最新日期排列 Note: 更新后,需要刷新线上数据库视图, 当然对目前线上无影响, 只是消除日期隐患. Reviewed-on: daoyoucloud/tachybase#859 Reviewed-by: sealday <zhanglin@daoyoucloud.com> Co-authored-by: bai.zixv <bai.zixv@foxmail.com> Co-committed-by: bai.zixv <bai.zixv@foxmail.com>
This commit is contained in:
parent
e84fb947db
commit
b3724d49d5
@ -195,9 +195,16 @@ WITH RECURSIVE
|
||||
-- 主查询
|
||||
-- 根据计算后的表,获取最终的视图
|
||||
SELECT
|
||||
*
|
||||
row_num,
|
||||
company_id,
|
||||
"MONTH" AT TIME ZONE 'UTC' AS "MONTH",
|
||||
input_tax_amount,
|
||||
out_tax_amount,
|
||||
monthly_tax_amount,
|
||||
super_tax_amount,
|
||||
monthly_total_tax_amount
|
||||
FROM
|
||||
G_INTIAL_TAX
|
||||
ORDER BY
|
||||
company_id,
|
||||
"MONTH"
|
||||
"MONTH" DESC,
|
||||
company_id
|
||||
|
Loading…
Reference in New Issue
Block a user