优化
This commit is contained in:
@@ -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;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user