From 6ad64ee26894805e312925a4f4bf476c789d17fd Mon Sep 17 00:00:00 2001 From: Neo Yang Date: Mon, 14 Sep 2026 13:32:22 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=80=8B=E4=BA=BA=E8=B2=BB=E7=94=A8?= =?UTF-8?q?=E5=BD=99=E6=95=B4=E8=A1=A8=E5=8F=8A=E6=89=A3=E7=B9=B3=E6=98=8E?= =?UTF-8?q?=E7=B4=B0=E6=8E=92=E9=99=A4=E5=B7=B2=E4=BD=9C=E5=BB=A2=E9=A0=98?= =?UTF-8?q?=E6=93=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 教育訓練系統/Web/DAC/領據系統/DAC_領據2.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/教育訓練系統/Web/DAC/領據系統/DAC_領據2.cs b/教育訓練系統/Web/DAC/領據系統/DAC_領據2.cs index e8e2f94..cd7545f 100644 --- a/教育訓練系統/Web/DAC/領據系統/DAC_領據2.cs +++ b/教育訓練系統/Web/DAC/領據系統/DAC_領據2.cs @@ -310,9 +310,10 @@ namespace Education , ISNULL(B.合計金額, 0) - ISNULL(B.應扣繳稅額, 0) - ISNULL(B.服務費, 0) + ISNULL(C.合計, 0) 付款金額 , row_number() over (order by A.領款人姓名) as rowid from 領據 A - left join 勞務費 B on A.編號 = B.領據編號 and B.編號 is not NULL and B.編號 <> '' - left join 差旅費 C on A.編號 = C.領據編號 and C.編號 is not NULL and C.編號 <> '' + left join 勞務費 B on A.編號 = B.領據編號 and B.編號 is not NULL and B.編號 <> '' and ISNULL(B.作廢, 0) <> 1 + left join 差旅費 C on A.編號 = C.領據編號 and C.編號 is not NULL and C.編號 <> '' and ISNULL(C.作廢, 0) <> 1 where 1=1 + and ISNULL(A.作廢, 0) <> 1 "; AddWhere(cmdSelect, ref noInput, 起日, 迄日, 身分別, null, null, null, null, null, 付款方式); @@ -411,7 +412,9 @@ namespace Education , row_number() over (order by A.領款人姓名) as rowid from 領據 A join 勞務費 B on A.編號 = B.領據編號 and B.編號 is not NULL and B.編號 <> '' - where 1=1"; + where 1=1 + and ISNULL(A.作廢, 0) <> 1 + and ISNULL(B.作廢, 0) <> 1"; List wheres = new List(); if (起日 != null && 迄日 != null) -- 2.54.0