mirror of
https://github.com/grocy/grocy.git
synced 2025-08-07 23:09:48 +00:00
Don't prefill for empty prices when editing a stock entry (fixes #961)
This commit is contained in:
parent
a6db08943c
commit
e039db22f5
@ -24,6 +24,7 @@
|
|||||||
- Fixed that `FEATURE_SETTING_STOCK_COUNT_OPENED_PRODUCTS_AGAINST_MINIMUM_STOCK_AMOUNT` (option to configure if opened products should be considered for minimum stock amounts) was not handled correctly (thanks @teddybeermaniac)
|
- Fixed that `FEATURE_SETTING_STOCK_COUNT_OPENED_PRODUCTS_AGAINST_MINIMUM_STOCK_AMOUNT` (option to configure if opened products should be considered for minimum stock amounts) was not handled correctly (thanks @teddybeermaniac)
|
||||||
- Fixed that the "Expiring soon" sum (yellow header-button) on the stock overview page didn't include products which expire today (thanks @fipwmaqzufheoxq92ebc)
|
- Fixed that the "Expiring soon" sum (yellow header-button) on the stock overview page didn't include products which expire today (thanks @fipwmaqzufheoxq92ebc)
|
||||||
- Fixed that the shopping cart icon on the stock overview page was also shown if the product was on an already deleted shopping list (if enabled) (thanks @fipwmaqzufheoxq92ebc)
|
- Fixed that the shopping cart icon on the stock overview page was also shown if the product was on an already deleted shopping list (if enabled) (thanks @fipwmaqzufheoxq92ebc)
|
||||||
|
- Fixed that when editing a stock entry without a price, the price field was prefilled with `1`
|
||||||
|
|
||||||
### Recipe improvements/fixes
|
### Recipe improvements/fixes
|
||||||
- It's now possible to print recipes (button next to the recipe title) (thanks @zsarnett)
|
- It's now possible to print recipes (button next to the recipe title) (thanks @zsarnett)
|
||||||
|
@ -71,9 +71,19 @@
|
|||||||
))
|
))
|
||||||
|
|
||||||
@if(GROCY_FEATURE_FLAG_STOCK_PRICE_TRACKING)
|
@if(GROCY_FEATURE_FLAG_STOCK_PRICE_TRACKING)
|
||||||
|
@php
|
||||||
|
if (empty($stockEntry->price))
|
||||||
|
{
|
||||||
|
$price = '';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$price = $stockEntry->price;
|
||||||
|
}
|
||||||
|
@endphp
|
||||||
@include('components.numberpicker', array(
|
@include('components.numberpicker', array(
|
||||||
'id' => 'price',
|
'id' => 'price',
|
||||||
'value' => $stockEntry->price,
|
'value' => $price,
|
||||||
'label' => 'Price',
|
'label' => 'Price',
|
||||||
'min' => 0,
|
'min' => 0,
|
||||||
'step' => 0.01,
|
'step' => 0.01,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user