Browse Source

库存不足提示修改

dev_DY_CC
lvzb 11 months ago
parent
commit
d63f0b5184
  1. 6
      be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Domain/Transactions/TransactionExtensions.cs

6
be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Domain/Transactions/TransactionExtensions.cs

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

Loading…
Cancel
Save