From c6d480a90d3021e50daed65295662b4e279a7680 Mon Sep 17 00:00:00 2001 From: lilili Date: Fri, 30 Jun 2023 10:21:29 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../WMS/WMSDeleteReceipts.cs | 24 +++++++++++-------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/WMS-BS/NFine.Application/WMS/WMSDeleteReceipts.cs b/WMS-BS/NFine.Application/WMS/WMSDeleteReceipts.cs index 42e17c3..f0d56b7 100644 --- a/WMS-BS/NFine.Application/WMS/WMSDeleteReceipts.cs +++ b/WMS-BS/NFine.Application/WMS/WMSDeleteReceipts.cs @@ -1083,20 +1083,24 @@ namespace NFine.Application.WMS AND b.LotNo NOT LIKE '%-%' GROUP BY a.SDNCode,a.Sequence,a.SDNQuantity"; } - var datas = Repository().FindDataSetBySql(sql).Tables[0]; - if(datas.Rows.Count<1) - return msg.ToString(); - foreach (DataRow data in datas.Rows) + if (!sql.IsEmpty()) { - string code= data["Code"].ToString(); - string sequence = data["Sequence"].ToString(); - decimal quantity = data["Quantity"].ToDecimal(); - decimal issueQuantity= data["IssueQuantity"].ToDecimal(); - if (quantity!= issueQuantity) + var datas = Repository().FindDataSetBySql(sql).Tables[0]; + if (datas.Rows.Count < 1) + return msg.ToString(); + foreach (DataRow data in datas.Rows) { - msg.Append($@"单据号:{code},行号:{sequence},已经生成条码,请先删除条码后再取消单据; "); + string code = data["Code"].ToString(); + string sequence = data["Sequence"].ToString(); + decimal quantity = data["Quantity"].ToDecimal(); + decimal issueQuantity = data["IssueQuantity"].ToDecimal(); + if (quantity != issueQuantity) + { + msg.Append($@"单据号:{code},行号:{sequence},已经生成条码,请先删除条码后再取消单据; "); + } } } + return msg.ToString(); }