Небольшая правка
This commit is contained in:
parent
001688a3a0
commit
366a106308
@ -150,15 +150,12 @@ namespace GarmentFactoryFileImplement.Implements
|
||||
return false;
|
||||
}
|
||||
|
||||
foreach (Shop shop in source.Shops)
|
||||
var shopsWithFreeSpace = source.Shops.Where(x => x.TextileMaxCount - x.ShopTextiles.Select(x => x.Value.Item2).Sum() > 0);
|
||||
|
||||
foreach (Shop shop in shopsWithFreeSpace)
|
||||
{
|
||||
int freeSpace = shop.TextileMaxCount - shop.ShopTextiles.Select(x => x.Value.Item2).Sum();
|
||||
|
||||
if (freeSpace <= 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
freeSpace = Math.Min(freeSpace, model.Count);
|
||||
model.Count -= freeSpace;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user