Browse Source

其他类型物料 不允许超发

SCP_CYJ
钱峰 14 hours ago
parent
commit
b57940ca4e
  1. 25
      Controller/SCP_ToleranceProportion_Controller.cs

25
Controller/SCP_ToleranceProportion_Controller.cs

@ -281,19 +281,9 @@ namespace CK.SCP.Controller
{
List<string> ErrorList = new List<string>();
var canQty = entity.AskQty - entity.ShippedQty - entity.ReduceQty;
// WS 和 WG 类型物料 填写的 发货数 不能大于 (要货数量-已发数量)
if (entity.DockCode == "WS" || entity.DockCode == "WG")
{
if (canQty > 0)
{
if (QtyAll > canQty)
{
ErrorList.Add(entity.PartCode + "发货数量>可发数量");
}
}
}
// YC 和 WT 填写的 发货数 能大于 (要货数 - 已发数量) 但是 不能 大于容差范围 并且 要货数 - 已发数量 不能小于等于0
else if (entity.DockCode == "YC" || entity.DockCode == "WT")
if (entity.DockCode == "YC" || entity.DockCode == "WT")
{
using (ScpEntities db = EntitiesFactory.CreateScpInstance())
{
@ -317,9 +307,16 @@ namespace CK.SCP.Controller
}
}
}
else if ((canQty <= 0) && (QtyAll > 0))
else if (canQty > 0)
{
if (QtyAll > canQty)
{
ErrorList.Add(entity.PartCode + "发货数量>可发数量");
}
}
else if (canQty <= 0)
{
ErrorList.Add(entity.PartCode + "只能超发一次哦");
ErrorList.Add(entity.PartCode + "不能超发");
}

Loading…
Cancel
Save