反作废
This commit is contained in:
@@ -127,6 +127,19 @@ namespace WMS.Web.Domain.Entitys
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 反作废
|
||||
/// </summary>
|
||||
public void NoRepeal(int repealerId, List<int> detailsIds)
|
||||
{
|
||||
this.RepealerId = 0;
|
||||
this.RepealTime = null;
|
||||
//明细行作废
|
||||
this.Details.Where(x => detailsIds.Contains(x.Id)).ToList().ForEach(x => { x.IsRepeal = false; });
|
||||
|
||||
this.ChangeInstockStatus();//重新计算单据的状态
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 创建订单号
|
||||
|
||||
@@ -207,6 +207,27 @@ namespace WMS.Web.Domain.Entitys
|
||||
GenerateStatus();
|
||||
}
|
||||
/// <summary>
|
||||
/// 反作废
|
||||
/// </summary>
|
||||
public void NoRepeal(int creatorId, List<int> ids)
|
||||
{
|
||||
this.OperatorId = 0;
|
||||
this.OperateTime = null;
|
||||
foreach (var d in this.Details.Where(w => ids.Contains(w.Id)))
|
||||
{
|
||||
d.IsRepeal = false;
|
||||
}
|
||||
|
||||
var details = this.Details.Where(w => w.IsRepeal != true).ToList();
|
||||
|
||||
if (details.Where(w => w.RealityQty <= 0).Count() == details.Count())
|
||||
this.Status = OutStockStatus.Wait;
|
||||
else if (details.Where(w => w.RealityQty >= w.AccruedQty).Count() == details.Count())
|
||||
this.Status = OutStockStatus.Already;
|
||||
else
|
||||
this.Status = OutStockStatus.Part;
|
||||
}
|
||||
/// <summary>
|
||||
/// 合并
|
||||
/// </summary>
|
||||
/// <param name="list"></param>
|
||||
|
||||
Reference in New Issue
Block a user