From 3d24d66c21c6ab1f2d3bddaf5e2838213cb99969 Mon Sep 17 00:00:00 2001
From: admin <qiutairan163@163.com>
Date: 星期二, 16 十二月 2025 10:41:48 +0800
Subject: [PATCH] 关单如果锁定数量=0,修改托盘库存状态
---
Wms/WMS.BLL/BllSoServer/ExportNoticeServer.cs | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/Wms/WMS.BLL/BllSoServer/ExportNoticeServer.cs b/Wms/WMS.BLL/BllSoServer/ExportNoticeServer.cs
index 77dc4dd..791436c 100644
--- a/Wms/WMS.BLL/BllSoServer/ExportNoticeServer.cs
+++ b/Wms/WMS.BLL/BllSoServer/ExportNoticeServer.cs
@@ -2016,10 +2016,14 @@
string stockDetailSql = $@"select LockQty-{lessQty} as morelockQty from DataStockDetail where IsDel='0' and SkuNo='{d.SkuNo}' and LotNo='{d.LotNo}' and PalletNo='{dr["PalletNo"] + ""}'";
decimal morelockQty = Db.Ado.GetDecimal(stockDetailSql);
- if (morelockQty >= 0)
+ if (morelockQty > 0)
{
sqlList.Add($@"update DataStockDetail set LockQty=LockQty-{lessQty} where IsDel='0' and SkuNo='{d.SkuNo}' and LotNo='{d.LotNo}' and PalletNo='{dr["PalletNo"] + ""}'");
}
+ else if (morelockQty == 0)
+ {
+ sqlList.Add($@"update DataStockDetail set LockQty=0,Status='0' where IsDel='0' and SkuNo='{d.SkuNo}' and LotNo='{d.LotNo}' and PalletNo='{dr["PalletNo"] + ""}'");
+ }
}
}
--
Gitblit v1.8.0