修复bug
This commit is contained in:
@@ -126,9 +126,10 @@ namespace WMS.Web.Domain.Entitys
|
||||
MaterialId = materialId,
|
||||
Qty = qty
|
||||
});
|
||||
}else
|
||||
}
|
||||
else
|
||||
{
|
||||
d.Qty = d.Qty + qty;
|
||||
d.Qty = qty;
|
||||
}
|
||||
return Result.ReSuccess();
|
||||
}
|
||||
@@ -141,18 +142,9 @@ namespace WMS.Web.Domain.Entitys
|
||||
public Result BackRecordDown(int materialId, decimal qty)
|
||||
{
|
||||
var d = this.Details.FirstOrDefault(f => f.MaterialId == materialId);
|
||||
if (d == null)
|
||||
{
|
||||
this.Details.Add(new BoxDetails()
|
||||
{
|
||||
MaterialId = materialId,
|
||||
Qty = qty
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
d.Qty = d.Qty + qty;
|
||||
}
|
||||
if (d != null)
|
||||
d.Qty = (d.Qty - qty) > 0 ? (d.Qty - qty) : 0;
|
||||
|
||||
return Result.ReSuccess();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user