|
|
@ -30,12 +30,16 @@ public static class TransactionExtensions |
|
|
|
{ |
|
|
|
if (!location.EnableNegative) |
|
|
|
{ |
|
|
|
if (existQty != 0) |
|
|
|
{ |
|
|
|
existQty = -transaction.Qty+ existQty; |
|
|
|
} |
|
|
|
throw new UserFriendlyException($"{location.Code} 库位不允许负库存。{Environment.NewLine}" + |
|
|
|
$"箱码: {transaction.PackingCode}{Environment.NewLine}" + |
|
|
|
$"ERP料号: {transaction.ItemCode}{Environment.NewLine}" + |
|
|
|
$"批次: {transaction.Lot}{Environment.NewLine}" + |
|
|
|
$"状态: {transaction.Status}{Environment.NewLine}" + |
|
|
|
$"出库数量 {transaction.Qty}{Environment.NewLine}" + |
|
|
|
$"出库数量 {-transaction.Qty}{Environment.NewLine}" + |
|
|
|
$"库存余额数量 {existQty}"); |
|
|
|
} |
|
|
|
|
|
|
|