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