Use exact matches for product barcode lookups (closes #366)

This commit is contained in:
Bernd Bestel
2019-09-24 09:52:05 +02:00
parent 53c56cc1cb
commit 099ac7e75a
3 changed files with 3 additions and 2 deletions

View File

@@ -17,7 +17,7 @@
<select class="form-control product-combobox barcodescanner-input" id="product_id" name="product_id" @if($isRequired) required @endif @if($disabled) disabled @endif>
<option value=""></option>
@foreach($products as $product)
<option data-additional-searchdata="{{ $product->barcode }}" value="{{ $product->id }}">{{ $product->name }}</option>
<option data-additional-searchdata="{{ $product->barcode }}@if(!empty($product->barcode)),@endif" value="{{ $product->id }}">{{ $product->name }}</option>
@endforeach
</select>
<div class="invalid-feedback">{{ $__t('You have to select a product') }}</div>