mirror of
https://github.com/grocy/grocy.git
synced 2025-08-20 04:12:59 +00:00
Don't prefill for empty prices when editing a stock entry (fixes #961)
This commit is contained in:
@@ -71,9 +71,19 @@
|
||||
))
|
||||
|
||||
@if(GROCY_FEATURE_FLAG_STOCK_PRICE_TRACKING)
|
||||
@php
|
||||
if (empty($stockEntry->price))
|
||||
{
|
||||
$price = '';
|
||||
}
|
||||
else
|
||||
{
|
||||
$price = $stockEntry->price;
|
||||
}
|
||||
@endphp
|
||||
@include('components.numberpicker', array(
|
||||
'id' => 'price',
|
||||
'value' => $stockEntry->price,
|
||||
'value' => $price,
|
||||
'label' => 'Price',
|
||||
'min' => 0,
|
||||
'step' => 0.01,
|
||||
|
Reference in New Issue
Block a user