From e6ab4d5c0c36cabbd61f457db29ef04281e59bc6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=B0=20=E6=9C=B1?= <501697962@qq.com> Date: Thu, 2 Dec 2021 09:40:21 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E8=AE=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- NX.ERP.U8/Base/MaterielDAL.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/NX.ERP.U8/Base/MaterielDAL.cs b/NX.ERP.U8/Base/MaterielDAL.cs index d7f4c6e..b8a8348 100644 --- a/NX.ERP.U8/Base/MaterielDAL.cs +++ b/NX.ERP.U8/Base/MaterielDAL.cs @@ -435,12 +435,13 @@ namespace NX.ERP.U8 strSQL = $@" SELECT (CASE WHEN convert(decimal(36,3),isnull(inum,0))=0 then 0 else iMoney / iNum END) AS iPrice from IA_Summary WHERE cWhCode='{whCode}' AND cInvCode='{cInvCode}' AND iMonth={DateTime.Today.Month - 1} and iyear ={DateTime.Today.Year}"; _cost = conn.ExecuteScalar(strSQL, null, null, 10, System.Data.CommandType.Text); + } switch (cType) { case "按计价方式取单价": - iInvCost = _cost; + iInvCost = Math.Max(0,_cost); break; case "计划单价":