增加明细行作废
This commit is contained in:
@@ -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>
|
||||
/// 合并
|
||||
|
||||
@@ -63,6 +63,11 @@ namespace WMS.Web.Domain.Entitys
|
||||
[Column("OutStockEndTime")]
|
||||
public DateTime? OutStockEndTime { get; set; }
|
||||
/// <summary>
|
||||
/// 是否作废
|
||||
/// </summary>
|
||||
[Column("IsRepeal")]
|
||||
public bool? IsRepeal { get; set; } = false;
|
||||
/// <summary>
|
||||
/// 对应erp明细 同一个物料 存在于不同的来源单中(合并后出现多条)
|
||||
/// </summary>
|
||||
public List<OutStockTaskErpDetails> ErpDetails { get; set; } = new List<OutStockTaskErpDetails>();
|
||||
|
||||
Reference in New Issue
Block a user