1
This commit is contained in:
@@ -507,7 +507,6 @@ namespace Tnb.WarehouseMgr
|
||||
{
|
||||
cyDb = _db.CopyNew();
|
||||
}
|
||||
|
||||
List<Tuple<string, WmsCarryH, WmsCarryCode, BasLocation>> items = cyDb.Queryable<WmsCarryH>().LeftJoin<WmsCarryCode>((a, b) => a.id == b.carry_id)
|
||||
.LeftJoin<BasLocation>((a, b, c) => a.location_id == c.id)
|
||||
.Where(whereExpr)
|
||||
|
||||
@@ -317,13 +317,13 @@ namespace Tnb.WarehouseMgr
|
||||
item.actual_quantity += outsource_arriveqty;
|
||||
if (item.actual_quantity > item.outsource_quantity)
|
||||
{
|
||||
throw Oops.Bah($"委外收货单明细行物料{item.matcode} 批次{item.code_batch} 到货数量不能超过采购数量!");
|
||||
//throw Oops.Bah($"委外收货单明细行物料{item.matcode} 批次{item.code_batch} 到货数量不能超过采购数量!");
|
||||
}
|
||||
WmsOutsourceOrderD wmsOutsourceOrderD = wmsOutsourceOrderDs.Where(r => r.erp_line_pk == item.erp_outsource_order_d_pk).First();
|
||||
wmsOutsourceOrderD.actual_quantity += outsource_arriveqty;
|
||||
if (wmsOutsourceOrderD.actual_quantity > wmsOutsourceOrderD.outsource_quantity)
|
||||
{
|
||||
throw Oops.Bah($"采购订单明细行物料{wmsOutsourceOrderD.matcode} 批次{wmsOutsourceOrderD.code_batch} 到货数量不能超过采购数量!");
|
||||
//throw Oops.Bah($"采购订单明细行物料{wmsOutsourceOrderD.matcode} 批次{wmsOutsourceOrderD.code_batch} 到货数量不能超过采购数量!");
|
||||
}
|
||||
}
|
||||
await _db.Updateable(dList).UpdateColumns(r => r.actual_quantity).ExecuteCommandAsync();
|
||||
|
||||
@@ -222,7 +222,7 @@ namespace Tnb.WarehouseMgr
|
||||
item.purchase_prqty += purchase_arriveqty;
|
||||
if (item.purchase_prqty > item.purchase_qty)
|
||||
{
|
||||
throw Oops.Bah($"采购收货单明细行物料{item.material_code} 批次{item.code_batch} 到货数量不能超过采购数量!");
|
||||
//throw Oops.Bah($"采购收货单明细行物料{item.material_code} 批次{item.code_batch} 到货数量不能超过采购数量!");
|
||||
}
|
||||
|
||||
if (wmsPurchaseOrderDs.Count > 0)
|
||||
@@ -231,7 +231,7 @@ namespace Tnb.WarehouseMgr
|
||||
wmsPurchaseOrderD.actual_quantity += purchase_arriveqty;
|
||||
if (wmsPurchaseOrderD.actual_quantity > wmsPurchaseOrderD.purchase_quantity)
|
||||
{
|
||||
throw Oops.Bah($"采购订单明细行物料{wmsPurchaseOrderD.matcode} 批次{wmsPurchaseOrderD.code_batch} 到货数量不能超过采购数量!");
|
||||
//throw Oops.Bah($"采购订单明细行物料{wmsPurchaseOrderD.matcode} 批次{wmsPurchaseOrderD.code_batch} 到货数量不能超过采购数量!");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user