This commit is contained in:
tongfei
2024-03-22 14:29:37 +08:00
parent 0558f5d024
commit 31af75a15e
8 changed files with 84 additions and 8 deletions

View File

@@ -93,11 +93,17 @@ namespace WMS.Web.Domain.Entitys
/// <summary>
/// 作废
/// </summary>
public void Repeal(int repealerId)
public void Repeal(int repealerId,List<int> detailsIds)
{
this.Status = InstockStatus.Repeal;
this.RepealerId = repealerId;
this.RepealTime= DateTime.Now;
//明细行作废
this.Details.Where(x => detailsIds.Contains(x.Id)).ToList().ForEach(x => { x.IsRepeal = true; });
//如果明细全部作废,则单据状态作废
if (this.Details.All(x => x.IsRepeal == true))
this.Status = InstockStatus.Repeal;
}