From ab68a51ba7871e98ea1b63d02e2e0290d7d36781 Mon Sep 17 00:00:00 2001 From: Bernd Bestel Date: Fri, 13 Nov 2020 15:46:44 +0100 Subject: [PATCH] Recipe edit page fixes --- localization/strings.pot | 2 +- services/StockService.php | 1 - views/recipeform.blade.php | 3 ++- views/recipeposform.blade.php | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/localization/strings.pot b/localization/strings.pot index 0265df40..91d7a39c 100644 --- a/localization/strings.pot +++ b/localization/strings.pot @@ -1568,7 +1568,7 @@ msgstr "" msgid "A purchased date is required" msgstr "" -msgid "When a product is selected, one unit (per serving in purchase quantity unit) will be added to stock on consuming this recipe" +msgid "When a product is selected, one unit (per serving in stock quantity unit) will be added to stock on consuming this recipe" msgstr "" msgid "Produces product" diff --git a/services/StockService.php b/services/StockService.php index 94a50c77..1a54779b 100644 --- a/services/StockService.php +++ b/services/StockService.php @@ -91,7 +91,6 @@ class StockService extends BaseService // Tare weight handling // The given amount is the new total amount including the container weight (gross) // The amount to be posted needs to be the given amount - stock amount - tare weight - if ($productDetails->product->enable_tare_weight_handling == 1) { if ($amount <= floatval($productDetails->product->tare_weight) + floatval($productDetails->stock_amount)) diff --git a/views/recipeform.blade.php b/views/recipeform.blade.php index cec8546a..322aa93a 100644 --- a/views/recipeform.blade.php +++ b/views/recipeform.blade.php @@ -92,7 +92,8 @@ 'isRequired' => false, 'label' => 'Produces product', 'prefillById' => $mode == 'edit' ? $recipe->product_id : '', - 'hint' => $__t('When a product is selected, one unit (per serving in purchase quantity unit) will be added to stock on consuming this recipe') + 'hint' => $__t('When a product is selected, one unit (per serving in stock quantity unit) will be added to stock on consuming this recipe'), + 'disallowAllProductWorkflows' => true, )) @include('components.userfieldsform', array( diff --git a/views/recipeposform.blade.php b/views/recipeposform.blade.php index 514dd3ea..8b5ef9aa 100644 --- a/views/recipeposform.blade.php +++ b/views/recipeposform.blade.php @@ -61,7 +61,7 @@ @include('components.productamountpicker', array( 'value' => $value, 'initialQuId' => $initialQuId, - 'additionalGroupCssClasses' => 'mb-0' + 'additionalGroupCssClasses' => 'mb-1' ))