修复bug
This commit is contained in:
@@ -527,7 +527,7 @@ namespace WMS.Web.Domain.Services
|
||||
{
|
||||
//老物料,应收数量修改为0
|
||||
det.AccruedQty = 0;
|
||||
|
||||
det.IsRepeal = true;
|
||||
}
|
||||
//操作完后剔除
|
||||
erp_removeList.Add(erp_data);
|
||||
@@ -593,14 +593,21 @@ namespace WMS.Web.Domain.Services
|
||||
else if (details_Groups.Sum(x => x.RealityQtyTotal) >= details_Groups.Sum(x => x.AccruedQtyTotal))
|
||||
order.Status = InstockStatus.Already;
|
||||
|
||||
//明细都作废后 整个单据作废
|
||||
if (order.Details.Count() == order.Details.Where(w => w.IsRepeal == true).Count())
|
||||
{
|
||||
order.Status = InstockStatus.Repeal;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
//2.4金蝶删除的明细,要把任务单里的明细应入库数量改为0
|
||||
data_list.SelectMany(x => x.Details).Where(c => !erp_list.Any(a => a.ErpDetailId == c.ErpDetailId)).ToList().ForEach(x => { x.AccruedQty = 0; });
|
||||
data_list.SelectMany(x => x.Details).Where(c => !erp_list.Any(a => a.ErpDetailId == c.ErpDetailId))
|
||||
.ToList()
|
||||
.ForEach(x => { x.AccruedQty = 0;x.IsRepeal = true; });
|
||||
|
||||
//过滤掉已经作废的单据
|
||||
data_list = data_list.Where(w => w.Status != InstockStatus.Repeal).ToList();
|
||||
//data_list = data_list.Where(w => w.Status != InstockStatus.Repeal).ToList();
|
||||
//更新修改时间
|
||||
data_list.ForEach(f => f.WmsUpdateTime = DateTime.Now);
|
||||
//2.3.提交任务单的修改
|
||||
|
||||
Reference in New Issue
Block a user