@php $selectedStore = isset($result->store_id) ? explode(',', $result->store_id) : []; $taxes = defaultCompanyTaxes(); @endphp
{!! Form::label('stores', __('global_items.stores'), ['class' => 'control-label mb-2']) !!} {!! Form::select('stores[]', $stores, $selectedStore, [ 'class' => 'form-control select2', 'multiple' => 'true', 'data-actions-box' => 'true', 'data-width' => '100%', ]) !!}
{!! Form::label('main_category_id', __('item.main_category'), ['class' => 'control-label mb-2']) !!} {!! Form::select('main_category_id', $category, null, [ 'class' => 'form-control __select2_change', 'data-target' => '#subCatId', 'data-route' => route('global-items.get-category'), ]) !!}
@php $subCategory = isset($subCategory) ? $subCategory : []; @endphp
{!! Form::label('category_id', __('item.category'), ['class' => 'control-label mb-2']) !!} {!! Form::select('category_id', $subCategory, null, [ 'class' => 'form-control', 'id' => 'subCatId', 'title' => __('category.select_sub_category'), 'data-route' => route('global-items.get-skip-variation'), ]) !!}
{!! Form::label('name', __('item.item_name'), ['class' => 'control-label']) !!} {!! Form::text('name', null, ['class' => 'form-control']) !!}
{!! Form::label('regular_price', __('item.regular_price'), ['class' => 'control-label']) !!} {!! Form::text('regular_price', null, ['class' => 'form-control']) !!}
{{--
{!! Form::label('foodora_price', __('item.foodora_price',['tax' => session('outside_tax') ?? 0]), ['class' => 'control-label']) !!}
{!! Form::text('foodora_price', null, ['class' => 'form-control __foodora_price']) !!}
{!! Form::label('night_meny_price', __('item.night_meny_price', ['tax'=> $taxes['outside_tax']]), ['class' => 'control-label']) !!}
{!! Form::text('night_meny_price', null, ['class' => 'form-control __night_meny_price']) !!}
@if (isset($result)) @php $itemVat = ($result->outside_rate + 100) / 100; $priceExclVat = $result->night_meny_price > 0 ? $result->night_meny_price / $itemVat : 0; $priceNight = $result->night_meny_price; @endphp {!! __('item.price') !!}: {!! numberFormat($result->night_meny_price) . ' (' . numberFormat($priceExclVat) . ' Ex.VAT)' !!} @if (!empty($rawMaterialResult)) @php $sumOfPrice = 0; $rawpriceExclVat = 0; @endphp @foreach ($rawMaterialResult as $rItem) @if ($rItem->status == 1) @php $sumOfPrice += $rItem->total_price; $rawpriceExclVat += $rItem->sub_total_price; @endphp @endif @endforeach
{!! __('item.raw_cost') !!}: {!! numberFormat($sumOfPrice) . '(' . numberFormat($rawpriceExclVat) . ' Ex.VAT)' !!}
@php $percentageExc = $percentage = 0; @endphp @if ($rawpriceExclVat > 0 && $priceNight > 0) @php $percentage = round(($sumOfPrice / $priceNight) * 100, 2); @endphp @endif @if ($rawpriceExclVat > 0 && $priceExclVat > 0) @php $percentageExc = round(($rawpriceExclVat / $priceExclVat) * 100, 2); @endphp @endif {!! __('item.percentage') !!}: {{ $percentage }} % ({{ $percentageExc }} %) @endif
@endif
{!! Form::label('night_meny_inside_price', __('item.night_meny_inside_price',['tax' => session('inside_tax') ?? 0]), ['class' => 'control-label']) !!} {!! Form::text('night_meny_inside_price', null, ['class' => 'form-control __night_meny_inside_price __night_meny_price']) !!} @if (isset($result)) @php $itemVat = ($result->inside_rate + 100) / 100; $priceExclVat = $result->night_meny_inside_price > 0 ? $result->night_meny_inside_price / $itemVat : 0; $priceNight = $result->night_meny_inside_price; @endphp {!! __('item.price') !!}: {!! numberFormat($result->night_meny_inside_price) !!} ( {!! numberFormat($priceExclVat) !!} Ex.VAT) @if (!empty($rawMaterialResult)) @php $sumOfPrice = 0; $rawpriceExclVat = 0; @endphp @foreach ($rawMaterialResult as $rItem) @if ($rItem->status == 1) @php $sumOfPrice += $rItem->total_price; $rawpriceExclVat += $rItem->sub_total_price; @endphp @endif @endforeach
{!! __('item.raw_cost') !!}: {!! numberFormat($sumOfPrice) . '(' . numberFormat($rawpriceExclVat) . ' Ex.VAT)' !!}
@php $percentageExc = $percentage = 0; @endphp @if ($rawpriceExclVat > 0 && $priceNight > 0) @php $percentage = round(($sumOfPrice / $priceNight) * 100, 2); @endphp @endif @if ($rawpriceExclVat > 0 && $priceExclVat > 0) @php $percentageExc = round(($rawpriceExclVat / $priceExclVat) * 100, 2); @endphp @endif {!! __('item.percentage') !!}: {{ $percentage }} % ({{ $percentageExc }} %) @endif
@endif
--}}
{!! Form::label('report_group_id', __('item.report_group_id'), ['class' => 'control-label']) !!} {!! Form::select('report_group_id', zReportGroup(), null, ['class' => 'form-control ']) !!}
{!! Form::label('choose_design', __('item.choose_design'), ['class' => 'control-label']) !!} {!! Form::select('choose_design', buildItemDesign(), $chooseDesign, ['class' => 'form-control']) !!}
@php $selectedPlatform = isset($result->platform) ? explode(',', $result->platform) : []; @endphp
{!! Form::label('platform', __('global_items.platform'), ['class' => 'control-label mb-2']) !!} {!! Form::select('platform[]', itemFor(), $selectedPlatform, [ 'class' => 'form-control select2', 'multiple' => 'true', 'data-actions-box' => 'true', 'data-width' => '100%', ]) !!}
{!! Form::label('description', __('item.description'), ['class' => 'control-label']) !!} {!! Form::textarea('description', null, ['class' => 'form-control', 'rows' => 3]) !!}
{!! Form::label('en_description', __('item.en_description'), ['class' => 'control-label']) !!} {!! Form::textarea('en_description', null, ['class' => 'form-control', 'rows' => 3]) !!}
{!! Form::text('item_code', $itemCodeFinal , ['class' => 'form-control']) !!}
{!! Form::text('ean', null , ['class' => 'form-control']) !!}
@php $style = (isset($result->id)) ? "style='display:none;'" : ""; $offerVal = 0; if(isset($result)){ if($result->is_offer_item == 1 || isset($_GET['is_offer'])){ $offerVal = 1; } if($result->is_offer_item == 2){ $offerVal = 2; } } @endphp
{!! Form::select('is_offer_item', renderDeal(), $offerVal, ['class' => 'form-control is_offer_item']) !!}
@php $scheduleStyle = (isset($result) && $result->is_schedule == 1) || (isset($_GET['is_schedule'])) ? '' : 'style="display:none"'; @endphp
{{Form::label('id', __('advertisements.weeks'), array('class' => 'control-label'))}} {{--
--}}
@foreach($weekdays as $dayNo => $days) @endforeach
{!! Form::text('start_date', $startDate, [ 'class' => 'form-control datepicker-input-sch', ]) !!}
{!! Form::text('end_date',$endDate, [ 'class' => 'form-control datepicker-input-sch', ]) !!}
{{--
--}}
{!! Form::file('featured_image', ['class' => 'custom-file-upload-field']) !!}

{!! __('item.feature_image_note') !!}

@if (isset($result->featured_image))

@endif
{!! Form::file('gallery_image[]', ['class' => 'custom-file-upload-field', 'multiple' => 'multiple']) !!}

{!! __('item.gallery_image_note') !!}

@if (isset($gallery) && count($gallery) > 0)
@foreach ($gallery as $img)
@endforeach
@endif
@if (!empty(howSpicyIt()))
    @foreach (howSpicyIt() as $spciyKey => $spicyVal)
  • @endforeach
@endif
{!! Form::label('item_info', __('item.information'), ['class' => 'control-label']) !!} {!! Form::textarea('item_info', null, ['class' => 'form-control', 'rows' => 3]) !!}