{{ isset($inventory) ? trans('app.update_inventory') : trans('app.add_inventory') }} @if ($product->downloadable) ({{ trans('app.digital_product') }}) @endif

{{-- @can('delete', $inventory) {!! Form::open(['route' => ['admin.stock.inventory.trash', $inventory->id], 'method' => 'delete', 'class' => 'data-form']) !!} {!! Form::button(' ' . trans('app.trash'), ['type' => 'submit', 'class' => 'confirm ajax-silent btn btn-new btn-flat', 'title' => trans('app.trash'), 'data-toggle' => 'tooltip', 'data-placement' => 'top']) !!} {!! Form::close() !!} @endcan --}}
@include('admin.partials._product_widget') @php if (isset($inventory)) { $product = $inventory->product; } $requires_shipping = $product->requires_shipping || (isset($inventory) && $inventory->product->requires_shipping); $title_classes = isset($inventory) ? 'form-control' : 'form-control makeSlug'; @endphp {{ Form::hidden('product_id', $product->id) }} {{ Form::hidden('brand', $product->brand) }}
{!! Form::label('title', trans('app.form.title') . '*', ['class' => 'with-help']) !!} {!! Form::text('title', null, ['class' => $title_classes, 'placeholder' => trans('app.placeholder.title'), 'required']) !!}
{!! Form::label('available_from', trans('app.form.available_from'), ['class' => 'with-help']) !!}
{!! Form::text('available_from', null, ['class' => 'datetimepicker form-control', 'placeholder' => trans('app.placeholder.available_from')]) !!}
{!! Form::label('sku', trans('app.form.sku') . '*', ['class' => 'with-help']) !!} {!! Form::text('sku', null, ['class' => 'form-control', 'placeholder' => trans('app.placeholder.sku'), 'required']) !!}
@if (config('system_settings.show_item_conditions'))
{!! Form::label('condition', trans('app.form.condition') . '*', ['class' => 'with-help']) !!} {!! Form::select('condition', ['New' => trans('app.new'), 'Used' => trans('app.used'), 'Refurbished' => trans('app.refurbished')], isset($inventory) ? null : 'New', ['class' => 'form-control select2-normal', 'placeholder' => trans('app.placeholder.select'), 'required']) !!}
@endif
{!! Form::label('active', trans('app.form.status') . '*', ['class' => 'with-help']) !!} {!! Form::select('active', ['1' => trans('app.active'), '0' => trans('app.inactive')], isset($inventory) ? null : 1, ['class' => 'form-control select2-normal', 'placeholder' => trans('app.placeholder.select'), 'required']) !!}
@if (config('system_settings.show_item_conditions'))
{!! Form::label('condition_note', trans('app.form.condition_note'), ['class' => 'with-help']) !!} {!! Form::text('condition_note', null, ['class' => 'form-control input-sm', 'placeholder' => trans('app.placeholder.condition_note')]) !!}
@endif
{!! Form::label('description', trans('app.form.description'), ['class' => 'with-help']) !!} {!! Form::textarea('description', null, ['class' => 'form-control summernote', 'placeholder' => trans('app.placeholder.description')]) !!}

{{ trans('app.form.images') }}

{{ trans('help.multi_img_upload_instruction', ['size' => getAllowedMaxImgSize(), 'number' => getMaxNumberOfImgsForInventory(), 'dimension' => '800 x 800']) }}
@if (isset($inventoryVariant) && $inventoryVariant->count())

{{ trans('app.variants') }}

{{-- --}}
@include('admin.inventory._variants')
@endif @include('admin.inventory._key_features')

{{ trans('app.seo') }}

{!! Form::label('slug', trans('app.form.slug') . '*', ['class' => 'with-help']) !!} {!! Form::text('slug', null, ['class' => 'form-control slug', 'placeholder' => trans('app.placeholder.slug'), 'required']) !!}
{!! Form::label('tag_list[]', trans('app.form.tags'), ['class' => 'with-help']) !!} {!! Form::select('tag_list[]', $tags, null, ['class' => 'form-control select2-tag', 'multiple' => 'multiple']) !!}
{!! Form::label('meta_title', trans('app.form.meta_title'), ['class' => 'with-help']) !!} {!! Form::text('meta_title', null, ['class' => 'form-control', 'placeholder' => trans('app.placeholder.meta_title')]) !!}
{!! Form::label('meta_description', trans('app.form.meta_description'), ['class' => 'with-help']) !!} {!! Form::text('meta_description', null, ['class' => 'form-control', 'maxlength' => config('seo.meta.description_character_limit', '160'), 'placeholder' => trans('app.placeholder.meta_description')]) !!}
{{ trans('help.max_chat_allowed', ['size' => config('seo.meta.description_character_limit', '160')]) }}

* {{ trans('app.form.required_fields') }}

@if (isset($inventory)) {{ trans('app.form.cancel_update') }} @endif {!! Form::submit(trans('app.form.save'), ['class' => 'btn btn-flat btn-lg btn-new pull-right']) !!}

{{ trans('app.inventory_rules') }}

@if (is_incevio_package_loaded('auction')) @include('auction::admin._listing_type') @endif @if ($requires_shipping && !$product->downloadable)
{!! Form::label('stock_quantity', trans('app.form.stock_quantity') . '*', ['class' => 'with-help']) !!} {!! Form::number('stock_quantity', isset($inventory) ? null : 1, ['min' => 0, 'class' => 'form-control', 'placeholder' => trans('app.placeholder.stock_quantity'), 'required']) !!}
{!! Form::label('min_order_quantity', trans('app.form.min_order_quantity'), ['class' => 'with-help']) !!} {!! Form::number('min_order_quantity', isset($inventory) ? null : 1, ['min' => 1, 'class' => 'form-control', 'placeholder' => trans('app.placeholder.min_order_quantity')]) !!}
@endif
{!! Form::label('sale_price', trans('app.form.sale_price') . '*', ['class' => 'with-help']) !!}
@if (get_currency_prefix()) {{ get_currency_prefix() }} @endif {!! Form::number('sale_price', isset($inventory) ? $inventory->sale_price : null, ['class' => 'form-control', 'min' => $product->min_price, 'max' => $product->max_price ?? PHP_INT_MAX, 'step' => 'any', 'placeholder' => trans('app.placeholder.sale_price'), 'required']) !!} {{-- max_price ? ' max="'. $product->max_price .'"' : '' }} step="any" placeholder="{{ trans('app.placeholder.sale_price') }}" class="form-control" required="required"> --}} @if (get_currency_suffix()) {{ get_currency_suffix() }} @endif
{!! Form::label('offer_price', trans('app.form.offer_price'), ['class' => 'with-help']) !!}
@if (get_currency_prefix()) {{ get_currency_prefix() }} @endif {!! Form::number('offer_price', null, ['class' => 'form-control', 'step' => 'any', 'placeholder' => trans('app.placeholder.offer_price')]) !!} @if (get_currency_suffix()) {{ get_currency_suffix() }} @endif
{!! Form::label('offer_start', trans('app.form.offer_start'), ['class' => 'with-help']) !!}
{!! Form::text('offer_start', null, ['class' => 'form-control datetimepicker', 'placeholder' => trans('app.placeholder.offer_start')]) !!}
{!! Form::label('offer_end', trans('app.form.offer_end'), ['class' => 'with-help']) !!}
{!! Form::text('offer_end', null, ['class' => 'form-control datetimepicker', 'placeholder' => trans('app.placeholder.offer_end')]) !!}
@if (is_incevio_package_loaded('auction')) @include('auction::admin._inventory_fields') @endif
@if (is_incevio_package_loaded('pharmacy'))

{{ trans('pharmacy::lang.pharmacy') }}

@include('pharmacy::inventory_form')
@endif @if ($product->downloadable)

{{ trans('app.downloadable') }}

{!! Form::hidden('stock_quantity', 1) !!} @if (isset($inventory))
    @foreach ($inventory->attachments as $attachment)
  • {{ $attachment->name }} {{ get_formated_file_size($attachment->size) }}
  • @endforeach
@endif
{!! Form::label('digital_file', trans('app.form.digital_file'), ['class' => 'with-help']) !!} attachments->count() ? '' : 'required' }} />
{!! Form::label('download_limit', trans('app.form.download_limit'), ['class' => 'with-help']) !!} {!! Form::number('download_limit', isset($inventory) ? $inventory->download_limit : null, ['class' => 'form-control', 'placeholder' => trans('app.placeholder.download_limit')]) !!}
@endif @if ($attributes->count())

{{ trans('app.attributes') }}

@foreach ($attributes as $attribute)
{!! Form::label($attribute->name, $attribute->name . '*') !!}
@endforeach
@endif @if ($requires_shipping)

{{ trans('app.shipping') }}

@unless ($product->downloadable)
{!! Form::label('warehouse_id', trans('app.form.warehouse'), ['class' => 'with-help']) !!} {!! Form::select('warehouse_id', $warehouses, isset($inventory) ? null : config('shop_settings.default_warehouse_id'), ['class' => 'form-control select2', 'placeholder' => trans('app.placeholder.select')]) !!}
{!! Form::label('shipping_weight', trans('app.form.shipping_weight'), ['class' => 'with-help']) !!}
{!! Form::number('shipping_weight', null, ['class' => 'form-control', 'step' => 'any', 'min' => 0, 'placeholder' => trans('app.placeholder.shipping_weight')]) !!} {{ config('system_settings.weight_unit') ?: 'gm' }}
@if (is_incevio_package_loaded('packaging'))
{!! Form::label('packaging_list[]', trans('packaging::lang.packagings'), ['class' => 'with-help']) !!} {!! Form::select('packaging_list[]', $packagings, isset($inventory) ? null : config('shop_settings.default_packaging_ids'), ['class' => 'form-control select2-normal', 'multiple' => 'multiple']) !!}
@endif
{{ Form::hidden('free_shipping', 0) }} {!! Form::checkbox('free_shipping', null, null, ['id' => 'free_shipping', 'class' => 'icheckbox_line']) !!} {!! Form::label('free_shipping', trans('app.form.free_shipping')) !!}
@endunless
@endif

{{ trans('app.cross_selling') }}

{!! Form::label('linked_items[]', trans('app.form.linked_items'), ['class' => 'with-help']) !!} {!! Form::select('linked_items[]', $inventories, isset($inventory) ? unserialize($inventory->linked_items) : null, ['class' => 'form-control select2-normal', 'multiple' => 'multiple']) !!}

{{ trans('app.reporting') }}

{!! Form::label('supplier_id', trans('app.form.supplier'), ['class' => 'with-help']) !!} {!! Form::select('supplier_id', $suppliers, isset($inventory) ? null : config('shop_settings.default_supplier_id'), ['class' => 'form-control select2', 'placeholder' => trans('app.placeholder.select')]) !!}
{!! Form::label('purchase_price', trans('app.form.purchase_price'), ['class' => 'with-help']) !!}
@if (get_currency_prefix()) {{ get_currency_prefix() }} @endif {!! Form::number('purchase_price', null, ['class' => 'form-control', 'step' => 'any', 'placeholder' => trans('app.placeholder.purchase_price')]) !!} @if (get_currency_suffix()) {{ get_currency_suffix() }} @endif