This commit is contained in:
denisdulici 2017-10-06 16:22:31 +03:00
parent 8f5370d6a3
commit 244b3e8cc1
3 changed files with 5 additions and 4 deletions

View File

@ -40,6 +40,7 @@ class Item extends Request
'purchase_price' => 'required', 'purchase_price' => 'required',
'quantity' => 'required|integer', 'quantity' => 'required|integer',
'picture' => 'mimes:' . setting('general.file_types') . '|between:0,' . setting('general.file_size') * 1024, 'picture' => 'mimes:' . setting('general.file_types') . '|between:0,' . setting('general.file_size') * 1024,
'enabled' => 'required',
]; ];
} }
} }

View File

@ -20,9 +20,9 @@
{{ Form::textGroup('quantity', trans_choice('items.quantities', 1), 'cubes', ['required' => 'required'], '1') }} {{ Form::textGroup('quantity', trans_choice('items.quantities', 1), 'cubes', ['required' => 'required'], '1') }}
{{ Form::selectGroup('tax_id', trans_choice('general.taxes', 1), 'percent', $taxes, setting('general.default_tax', '')) }} {{ Form::selectGroup('tax_id', trans_choice('general.taxes', 1), 'percent', $taxes, setting('general.default_tax'), []) }}
{{ Form::selectGroup('category_id', trans_choice('general.categories', 1), 'folder-open-o', $categories) }} {{ Form::selectGroup('category_id', trans_choice('general.categories', 1), 'folder-open-o', $categories, null, []) }}
{{ Form::fileGroup('picture', trans_choice('general.pictures', 1)) }} {{ Form::fileGroup('picture', trans_choice('general.pictures', 1)) }}

View File

@ -25,9 +25,9 @@
{{ Form::textGroup('quantity', trans_choice('items.quantities', 1), 'cubes') }} {{ Form::textGroup('quantity', trans_choice('items.quantities', 1), 'cubes') }}
{{ Form::selectGroup('tax_id', trans_choice('general.taxes', 1), 'percent', $taxes) }} {{ Form::selectGroup('tax_id', trans_choice('general.taxes', 1), 'percent', $taxes, null, []) }}
{{ Form::selectGroup('category_id', trans_choice('general.categories', 1), 'folder-open-o', $categories) }} {{ Form::selectGroup('category_id', trans_choice('general.categories', 1), 'folder-open-o', $categories, null, []) }}
{{ Form::fileGroup('picture', trans_choice('general.pictures', 1)) }} {{ Form::fileGroup('picture', trans_choice('general.pictures', 1)) }}