Fix Product Shopping Location Prefill for Edits

This commit is contained in:
Kurt Riddlesperger 2020-04-26 05:14:14 -05:00
parent 37054475c2
commit 2588e8203d

View File

@ -93,9 +93,11 @@
<input type="hidden" name="location_id" id="location_id" value="1"> <input type="hidden" name="location_id" id="location_id" value="1">
@endif @endif
@php $prefillById = ''; if($mode=='edit') { $prefillById = $product->shopping_location_id; } @endphp
@if(GROCY_FEATURE_FLAG_STOCK_PRICE_TRACKING) @if(GROCY_FEATURE_FLAG_STOCK_PRICE_TRACKING)
@include('components.shoppinglocationpicker', array( @include('components.shoppinglocationpicker', array(
'label' => 'Default store', 'label' => 'Default store',
'prefillById' => $prefillById,
'shoppinglocations' => $shoppinglocations 'shoppinglocations' => $shoppinglocations
)) ))
@else @else