diff --git a/.gitignore b/.gitignore index ca1c7a3..e41ed9d 100644 --- a/.gitignore +++ b/.gitignore @@ -398,3 +398,4 @@ FodyWeavers.xsd # JetBrains Rider *.sln.iml +/Confectionery/ImplementationExtensions diff --git a/Confectionery/Confectionery/FormSell.cs b/Confectionery/Confectionery/FormSell.cs index 9380f58..db1c49d 100644 --- a/Confectionery/Confectionery/FormSell.cs +++ b/Confectionery/Confectionery/FormSell.cs @@ -52,7 +52,7 @@ namespace Confectionery bool operationResult = _logicS.Sell(Convert.ToInt32(comboBoxPastry.SelectedValue), count); if (!operationResult) { - throw new Exception("Ошибка при создании поставки. Дополнительная информация в логах."); + throw new Exception("Ошибка при создании списания. Дополнительная информация в логах."); } MessageBox.Show("Сохранение прошло успешно", "Сообщение", MessageBoxButtons.OK, MessageBoxIcon.Information); DialogResult = DialogResult.OK; diff --git a/Confectionery/ConfectioneryFileImplements/Implements/ShopStorage.cs b/Confectionery/ConfectioneryFileImplements/Implements/ShopStorage.cs index 214c74f..d37aa1b 100644 --- a/Confectionery/ConfectioneryFileImplements/Implements/ShopStorage.cs +++ b/Confectionery/ConfectioneryFileImplements/Implements/ShopStorage.cs @@ -115,15 +115,14 @@ namespace ConfectioneryFileImplement.Implements } else { - int dif = count - freeShopSpace; count -= freeShopSpace; if (shop.Pastries.TryGetValue(pastryId, out var pastryCount)) { - shop.Pastries[pastryId] = pastryCount + count; + shop.Pastries[pastryId] = pastryCount + freeShopSpace; } else { - shop.Pastries.Add(pastryId, count); + shop.Pastries.Add(pastryId, freeShopSpace); } shop.setShopPastriesNull(); }