From 6f035fd64db6d540697c901bfc9debba48b56329 Mon Sep 17 00:00:00 2001 From: Bernd Bestel Date: Tue, 21 Jan 2020 21:31:42 +0100 Subject: [PATCH] Allow decimal numbers for the kcal field (closes #492) --- changelog/55_UNRELEASED_2019-xx-xx.md | 1 + views/productform.blade.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/changelog/55_UNRELEASED_2019-xx-xx.md b/changelog/55_UNRELEASED_2019-xx-xx.md index ffc36686..851ec29b 100644 --- a/changelog/55_UNRELEASED_2019-xx-xx.md +++ b/changelog/55_UNRELEASED_2019-xx-xx.md @@ -12,6 +12,7 @@ ### Stock improvements/fixes - The productcard gets now also refreshed after a transaction was posted (purchase/consume/etc.) (thanks @kriddles) +- The product field calories (kcal) now also allows decimal numbers - Fixed that entering partial amounts was not possible on the inventory page (only applies if the product option "Allow partial units in stock" is enabled) - Fixed that on purchase a wrong minimum amount was enforced for products with enabled tare weight handling in combination with different purchase/stock quantity units - Fixed that the productcard did not load correctly when `FEATURE_FLAG_STOCK_LOCATION_TRACKING` was set to `false` (thanks @kriddles) diff --git a/views/productform.blade.php b/views/productform.blade.php index 9314b34b..f66c6005 100644 --- a/views/productform.blade.php +++ b/views/productform.blade.php @@ -219,7 +219,7 @@ 'id' => 'calories', 'label' => 'Energy (kcal)', 'min' => 0, - 'step' => 1, + 'step' => 0.01, 'value' => $value, 'invalidFeedback' => $__t('The amount cannot be lower than %s', '0'), 'hint' => $__t('Per stock quantity unit'),