@php require_frontend_packages(['datatables', 'summernote']); @endphp @extends('layout.default') @if($mode == 'edit') @section('title', $__t('Edit product')) @else @section('title', $__t('Create product')) @endif @section('content')

@if($mode == 'edit') @if(!empty($product->picture_file_name)) @endif @endif
@include('components.userfields_thead', array( 'userfields' => $productBarcodeUserfields )) @if($mode == "edit") @foreach($barcodes as $barcode) @if($barcode->product_id == $product->id || $barcode->product_id == null) @include('components.userfields_tbody', array( 'userfields' => $productBarcodeUserfields, 'userfieldValues' => FindAllObjectsInArrayByPropertyValue($productBarcodeUserfieldValues, 'object_id', $barcode->id) )) @endif @endforeach @endif
{{ $__t('Barcode') }} {{ $__t('Store') }} {{ $__t('Quantity unit') }} {{ $__t('Amount') }} {{ $__t('Last price') }} {{ $__t('Note') }}
{{ $barcode->barcode }} @if (FindObjectInArrayByPropertyValue($shoppinglocations, 'id', $barcode->shopping_location_id) !== null) {{ FindObjectInArrayByPropertyValue($shoppinglocations, 'id', $barcode->shopping_location_id)->name }} @endif @if(!empty($barcode->qu_id)) {{ FindObjectInArrayByPropertyValue($quantityunits, 'id', $barcode->qu_id)->name }} @endif @if(!empty($barcode->amount)) {{ $barcode->amount }} @endif {{ $barcode->last_price }} {{ $barcode->note }}
@if($mode == "edit") @foreach($quConversions as $quConversion) @endforeach @endif
{{ $__t('Quantity unit from') }} {{ $__t('Quantity unit to') }} {{ $__t('Factor') }}
{{ FindObjectInArrayByPropertyValue($quantityunits, 'id', $quConversion->from_qu_id)->name }} {{ FindObjectInArrayByPropertyValue($quantityunits, 'id', $quConversion->to_qu_id)->name }} {{ $quConversion->factor }} {!! $__t('This means 1 %1$s is the same as %2$s %3$s', FindObjectInArrayByPropertyValue($quantityunits, 'id', $quConversion->from_qu_id)->name, '' . $quConversion->factor . '', $__n($quConversion->factor, FindObjectInArrayByPropertyValue($quantityunits, 'id', $quConversion->to_qu_id)->name, FindObjectInArrayByPropertyValue($quantityunits, 'id', $quConversion->to_qu_id)->name_plural, true)) !!}
@if($mode == "edit" && !empty($product->picture_file_name))

{{ $__t('The current picture will be deleted on save') }}

@else

{{ $__t('No picture available') }}

@endif
@stop