出库修改箱

This commit is contained in:
18942506660
2024-03-05 15:11:03 +08:00
parent 65ccc41d1b
commit 430f8dfdfc
4 changed files with 67 additions and 1 deletions

View File

@@ -146,5 +146,19 @@ namespace WMS.Web.Domain.Entitys
return Result.ReSuccess();
}
/// <summary>
/// 出库
/// </summary>
/// <param name="materialId"></param>
/// <param name="qty"></param>
/// <returns></returns>
public Result OutStock(int materialId, decimal qty)
{
var d = this.Details.FirstOrDefault(f => f.MaterialId == materialId);
if (d != null)
d.Qty = (d.Qty - qty) > 0 ? (d.Qty - qty) : 0;
return Result.ReSuccess();
}
}
}