@extends('admin.template.master') @section('stylesheets') {!! Html::style('assets/admin/bower_components/select2/dist/css/select2.min.css') !!} @endsection @section('title')

Shipping Charge insert and update Shipping Charge

@endsection @section('main-content')

Update

{!! Form::open(['method' => 'post', 'url' => '/admin/shipping-charge-edit/' .$shpChrg->id]) !!}
{!! Form::label('Name') !!} {!! Form::text('name', $shpChrg->name, ['class' => 'form-control', 'placeholder' => 'Name','id' => 'name', 'required' => 'required']) !!} @if ($errors->has('name')) {!! $errors->first('name') !!}@endif
{!! Form::label('Amount') !!} {!! Form::text('amount', $shpChrg->amount, ['class' => 'form-control', 'placeholder' => 'Amount', 'required' => 'required']) !!} @if ($errors->has('amount')) {!! $errors->first('amount') !!}@endif
{!! Form::label('Shipping Method') !!} {!! Form::select('shipping_method_id[]', $shipping_method, $shippingChargeMethods, ['class' => 'form-control', 'id' => 'is_type', 'multiple' => 'multiple', 'required' => 'required']) !!} @if ($errors->has('shipping_method_id')) {!! $errors->first('shipping_method_id') !!}@endif
{{-- {{dd($selectedItemTypes)}} --}}
{!! Form::label('Item Type (If select all item types products will be selected)') !!}
Reset See Products {{-- {!! Form::select('products[]',$product, null, ['class' => 'form-control','id' => 'products' ,'multiple' => 'multiple']) !!} --}} {{-- {{dd($product->offeredProduct)}} --}} {{-- --}} @php $productCodes = implode(',', array_filter(array_map(fn($product) => $product->product_code_inv ?? '', $shippingChargeProducts))); @endphp
@foreach($shippingChargeProducts as $product) {{$product->product_code_inv ?? ''}} @endforeach
@if ($errors->has('products')) {!! $errors->first('products') !!}@endif
{!! Form::label('Note') !!} {!! Form::textarea('note', $shpChrg->note, ['class' => 'form-control', 'rows' => '3','placeholder' => 'Note', 'id' => 'note']) !!} @if ($errors->has('note')) {!! $errors->first('note') !!}@endif
{!! Form::label('Status') !!} {!! Form::select('status', [1 => 'Active', 0 => 'Inactive'], isset($shpChrg->status) ? $shpChrg->status : null, ['class' => 'form-control']) !!}
{!! Form::close() !!}
@endsection @section('javascripts') {!! Html::script('assets/admin/bower_components/select2/dist/js/select2.full.min.js') !!} {!! Html::script('assets/admin/bower_components/ckeditor/ckeditor.js') !!} @endsection