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

@yield('title')

@if($mode == 'edit') @if(!empty($product->picture_file_name)) @endif @endif
{{ $L('A name is required') }}
{{ $L('A location is required') }}
@php if($mode == 'edit') { $value = $product->min_stock_amount; } else { $value = 0; } @endphp @include('components.numberpicker', array( 'id' => 'min_stock_amount', 'label' => 'Minimum stock amount', 'min' => 0, 'value' => $value, 'invalidFeedback' => $L('The amount cannot be lower than #1', '0') )) @php if($mode == 'edit') { $value = $product->default_best_before_days; } else { $value = 0; } @endphp @include('components.numberpicker', array( 'id' => 'default_best_before_days', 'label' => 'Default best before days', 'min' => -1, 'value' => $value, 'invalidFeedback' => $L('The amount cannot be lower than #1', '-1'), 'hint' => $L('For purchases this amount of days will be added to today for the best before date suggestion') . ' (' . $L('-1 means that this product never expires') . ')' ))
{{ $L('A quantity unit is required') }}
{{ $L('A quantity unit is required') }}
@php if($mode == 'edit') { $value = $product->qu_factor_purchase_to_stock; } else { $value = 1; } @endphp @include('components.numberpicker', array( 'id' => 'qu_factor_purchase_to_stock', 'label' => 'Factor purchase to stock quantity unit', 'min' => 1, 'value' => $value, 'invalidFeedback' => $L('The amount cannot be lower than #1', '1'), 'additionalCssClasses' => 'input-group-qu', 'additionalHtmlElements' => '

' ))

{{ $L('If you don\'t select a file, the current picture will not be altered') }}

@if(!empty($product->picture_file_name))

{{ $L('The current picture will be deleted when you save the product') }}

@else

{{ $L('No picture') }}

@endif
@stop