diff --git a/changelog/81_UNRELEASED_xxxx-xx-xx.md b/changelog/81_UNRELEASED_xxxx-xx-xx.md new file mode 100644 index 00000000..73577318 --- /dev/null +++ b/changelog/81_UNRELEASED_xxxx-xx-xx.md @@ -0,0 +1,57 @@ +> ⚠️ xxxBREAKING CHANGESxxx + +> ❗ xxxImportant upgrade informationXXX + +> 💡 xxxMinor upgrade informationXXX + +### New Feature: xxxx + +- xxx + +### Stock + +- xxx + +### Shopping list + +- An amount of `0` is now allowed for shopping list items (just a convenience optimization, it was already possible to leave the amount field empty which implicitly resulted in an amount of `0`) + +### Recipes + +- xxx + +### Meal plan + +- xxx + +### Chores + +- xxx + +### Calendar + +- xxx + +### Tasks + +- xxx + +### Batteries + +- xxx + +### Equipment + +- xxx + +### Userfields + +- xxx + +### General + +- xxx + +### API + +- xxx diff --git a/views/components/productamountpicker.blade.php b/views/components/productamountpicker.blade.php index 74769ee0..c778df12 100644 --- a/views/components/productamountpicker.blade.php +++ b/views/components/productamountpicker.blade.php @@ -10,6 +10,15 @@ @php if(empty($label)) { $label = 'Amount'; } @endphp @php if(empty($initialQuId)) { $initialQuId = '-1'; } @endphp @php if(!isset($isRequired)) { $isRequired = true; } @endphp +@php if(!isset($allowZero)) { $allowZero = false; } @endphp + +@php +$minLocal = $DEFAULT_MIN_AMOUNT; +if ($allowZero) +{ +$minLocal = 0; +} +@endphp