|
|
@@ -837,7 +837,7 @@ namespace Business.SystemJobManagement
|
|
|
if (itemchild == null) { continue; }
|
|
|
var itemMaster = custList.Find(a => a.ItemNum == child.ComponentItem);
|
|
|
if (itemMaster == null || itemMaster.MRPRequired==0) { continue; }
|
|
|
- decimal scrap = child.QtyExchd > child.Scrap ? child.QtyExchd : child.Scrap;
|
|
|
+ decimal scrap = child.QtyExchd + child.Scrap;
|
|
|
/*//如果当前明细是BOM,则使用组件报废率
|
|
|
if (wmsBomList.Where(c => c.ParentItem == child.ComponentItem).Any())
|
|
|
{
|
|
|
@@ -872,6 +872,8 @@ namespace Business.SystemJobManagement
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
+ var delchildList = ic_bomchildList.Where(s => s.bom_number == c && !ItemList.Select(v => v.ComponentItem).Contains(s.item_number)).ToList();
|
|
|
+ childItemsDel.AddRange(delchildList);
|
|
|
foreach (var child in ItemList)
|
|
|
{
|
|
|
var itemchild = ic_itemList.Find(a => a.number == child.ComponentItem);
|
|
|
@@ -879,7 +881,7 @@ namespace Business.SystemJobManagement
|
|
|
|
|
|
bool flag = itemchild == null || itemMaster == null || itemMaster.MRPRequired == 0;
|
|
|
var icbomchild = ic_bomchildList.Find(s => s.bom_number == c && s.item_number == child.ComponentItem);
|
|
|
- decimal scrap = child.QtyExchd > child.Scrap ? child.QtyExchd : child.Scrap;
|
|
|
+ decimal scrap = child.QtyExchd + child.Scrap;
|
|
|
/*//如果当前明细是BOM,则使用组件报废率
|
|
|
if (wmsBomList.Where(c => c.ParentItem == child.ComponentItem).Any())
|
|
|
{
|