Show barcode as barcode-image on shopping list (closes #1133)

This commit is contained in:
Bernd Bestel
2020-12-20 19:31:12 +01:00
parent b2f555400c
commit 1d16021404
5 changed files with 34 additions and 2 deletions

View File

@@ -5,6 +5,7 @@
@section('viewJsName', 'shoppinglist')
@push('pageScripts')
<script src="{{ $U('/node_modules/bwip-js/dist/bwip-js-min.js?v=', true) }}{{ $version }}"></script>
<script src="{{ $U('/viewjs/purchase.js?v=', true) }}{{ $version }}"></script>
@endpush
@@ -165,6 +166,7 @@
<th class="@if(!GROCY_FEATURE_FLAG_STOCK_PRICE_TRACKING) d-none @endif">{{ $__t('Last price (Unit)') }}</th>
<th class="@if(!GROCY_FEATURE_FLAG_STOCK_PRICE_TRACKING) d-none @endif">{{ $__t('Last price (Total)') }}</th>
<th class="@if(!GROCY_FEATURE_FLAG_STOCK_PRICE_TRACKING) d-none @endif">{{ $__t('Default store') }}</th>
<th>{{ $__t('Barcodes') }}</th>
@include('components.userfields_thead', array(
'userfields' => $userfields
@@ -247,6 +249,14 @@
<td class="@if(!GROCY_FEATURE_FLAG_STOCK_PRICE_TRACKING) d-none @endif">
{{ $listItem->default_shopping_location_name }}
</td>
<td>
@foreach(explode(',', $listItem->product_barcodes) as $barcode)
@if(!empty($barcode))
<img class="barcode img-fluid pr-2"
data-barcode="{{ $barcode }}">
@endif
@endforeach
</td>
@include('components.userfields_tbody', array(
'userfields' => $userfields,
@@ -399,4 +409,4 @@
</div>
</div>
</div>
@stop
@stop