@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') . ')' )) @php if($mode == 'edit') { $value = $product->default_best_before_days_after_open; } else { $value = 0; } @endphp @include('components.numberpicker', array( 'id' => 'default_best_before_days_after_open', 'label' => 'Default best before days after opened', 'min' => 0, 'value' => $value, 'invalidFeedback' => $L('The amount cannot be lower than #1', '-1'), 'hint' => $L('When a product was marked as opened, the best before date will be replaced by today + this amount of days (a value of 0 disables this)') ))
{{ $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' => '

' ))
allow_partial_units_in_stock == 1) checked @endif class="form-check-input" type="checkbox" id="allow_partial_units_in_stock" name="allow_partial_units_in_stock" value="1">
@if(!empty($product->picture_file_name))

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

@else

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

@endif
@stop