@extends('layout.default') @if($mode == 'edit') @section('title', $__t('Edit product')) @else @section('title', $__t('Create product')) @endif @section('viewJsName', 'productform') @section('content')

@yield('title')


@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) @if($quConversion->product_id == $product->id || $quConversion->product_id == null && ($quConversion->product_id != null || $quConversion->from_qu_id == $product->qu_id_purchase || $quConversion->from_qu_id == $product->qu_id_stock || $quConversion->to_qu_id == $product->qu_id_purchase || $quConversion->to_qu_id == $product->qu_id_stock)) @endif @endforeach @endif
{{ $__t('Quantity unit from') }} {{ $__t('Quantity unit to') }} {{ $__t('Factor') }} {{ $__t('Group')}}
{{ FindObjectInArrayByPropertyValue($quantityunits, 'id', $quConversion->from_qu_id)->name }} {{ FindObjectInArrayByPropertyValue($quantityunits, 'id', $quConversion->to_qu_id)->name }} {{ $quConversion->factor }} @if($quConversion->product_id != null) {{ $__t('Product overrides') }} @else {{ $__t('Default conversions') }} @endif {!! $__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)) !!}
@if($mode == "edit" && !empty($product->picture_file_name))

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

@else

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

@endif
@stop