From 0279c00748b4a7815e83e34d3df3edc5fc63eb47 Mon Sep 17 00:00:00 2001 From: wjh Date: Fri, 23 Aug 2024 17:16:22 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=9B=BF=E8=BA=AB?= =?UTF-8?q?=E5=90=88=E5=90=8C=E8=AE=A1=E7=AE=97=E6=9C=89=E9=97=AE=E9=A2=98?= =?UTF-8?q?=20(#1484)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-on: https://git.daoyoucloud.com/daoyoucloud/tachybase/pulls/1484 Reviewed-by: sealday Co-authored-by: wjh Co-committed-by: wjh --- .../@hera/plugin-rental/src/server/sqls/settlement_calc.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/plugins/@hera/plugin-rental/src/server/sqls/settlement_calc.sql b/packages/plugins/@hera/plugin-rental/src/server/sqls/settlement_calc.sql index 201d44314..1c30fd53c 100644 --- a/packages/plugins/@hera/plugin-rental/src/server/sqls/settlement_calc.sql +++ b/packages/plugins/@hera/plugin-rental/src/server/sqls/settlement_calc.sql @@ -140,7 +140,7 @@ SELECT contract_items ci LEFT JOIN contract_plans cp ON ci.contract_plan_id = cp.id WHERE - ci.contract_id = COALESCE(main.id, c.id) + ci.contract_id = c.id AND ci.start_date IS NOT NULL AND ci.end_date IS NOT NULL )