This commit is contained in:
@@ -1537,8 +1537,8 @@ namespace AyaNova.Util
|
||||
throw new System.Exception(err);
|
||||
}
|
||||
|
||||
// 50% chance it has serial numbers
|
||||
//MIGRATE_OUTSTANDING this is just temporary until inventory is coded fully
|
||||
PartInventoryBiz PartInventoryBizNess = PartInventoryBiz.GetBiz(ct);
|
||||
// 50% chance it has serial numbers
|
||||
if (Fake.Random.Number() == 1)
|
||||
{
|
||||
var serialCount = Fake.Random.Number(1, 5);
|
||||
@@ -1548,6 +1548,13 @@ namespace AyaNova.Util
|
||||
|
||||
}
|
||||
await ct.SaveChangesAsync();
|
||||
//add inventory to cover serials
|
||||
await PartInventoryBizNess.CreateAsync(new dtPartInventory() { PartId = NewObject.Id, PartWarehouseId = 1, Quantity = serialCount });
|
||||
}
|
||||
else
|
||||
{
|
||||
//add random inventory level
|
||||
await PartInventoryBizNess.CreateAsync(new dtPartInventory() { PartId = NewObject.Id, PartWarehouseId = 1, Quantity = Fake.Random.Number(1, 100) });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user