增加明细行作废

This commit is contained in:
18942506660
2024-03-22 14:11:17 +08:00
parent 4a5f2d025f
commit 0558f5d024
6 changed files with 50 additions and 13 deletions

View File

@@ -191,11 +191,17 @@ namespace WMS.Web.Domain.Entitys
/// <summary>
/// 作废
/// </summary>
public void Repeal(int creatorId)
public void Repeal(int creatorId, List<int> ids)
{
this.OperatorId = creatorId;
this.OperateTime = DateTime.Now;
this.Status = OutStockStatus.Repeal;
foreach (var d in this.Details.Where(w => ids.Contains(w.Id)))
{
d.IsRepeal = true;
}
//如果明细全部作废,则单据状态作废
if (this.Details.Where(w => w.IsRepeal == true).Count() == this.Details.Count())
this.Status = OutStockStatus.Repeal;
}
/// <summary>
/// 合并