修改盘点数量不对的问题。

This commit is contained in:
2025-05-27 13:56:25 +08:00
parent 5632a19303
commit a17ed1650c
6 changed files with 27 additions and 4 deletions

View File

@@ -1545,9 +1545,17 @@ namespace WMS.Web.Domain.Services
item.Details.ForEach(x =>
{
var current_sers_info = out_SerialNumbers.Where(o => o.BoxId == item.BoxId && o.MaterialNumber == x.MaterialNumber).ToList();
var current_sers_infoCount = out_SerialNumbers.Where(o => o.BoxId == item.BoxId && o.MaterialNumber == x.MaterialNumber && o.isNotCount!="1").ToList();
if (current_sers_info != null && current_sers_info.Count != 0)
{
x.Qty = x.Qty - current_sers_info.Count;
//if (isNoCount == "1")
//{
//}
//else
//{
x.Qty = x.Qty - current_sers_infoCount.Count;
//}
var crrent_sers = current_sers_info.Select(t => t.SerialNumber).ToList();
x.SerialNumbers.RemoveAll(r => crrent_sers.Contains(r));