@extends('layout.padrao')
@section('title', ' Edit - Freight Fee Search')
@section('content')
@if($errors->any())
@foreach($errors->all() as $error)
{{ $error }}
@endforeach
@endif
{{ Form::open(array('method' => 'get', 'files'=>true, 'enctype'=>'multipart/form-data', 'route'=>array('updateOceanFreightFee', $getId))) }}
{{ csrf_field() }}
{!! Form::label('carriers_id', 'Carrier', [ 'class' => 'w-100 control-label', ]) !!}
{!! Form::select('carriers_id', $select['carriers'], old('carriers_id', $maritimeFreightRate->carriers_id), ['class' => 'form-control' , 'id' => 'carriers', 'readonly' => 'readonly' ]) !!}
{!! Form::label('carrierQuoteReference', 'Carrier Quote Reference', [ 'class' => 'w-100 control-label', ]) !!}
{!! Form::text('carrierQuoteReference', old('carrierQuoteReference', $maritimeFreightRate->carrierQuoteReference), ['class' => 'form-control ', 'id' => 'carrierQuoteReference', 'readonly' => 'readonly']) !!}
{!! Form::label('freeTimeOrigin', 'Free Time Origin', [ 'class' => 'w-100 control-label']) !!}
{!! Form::number('freeTimeOrigin', old('freeTimeOrigin' , $maritimeFreightRate->freeTimeOrigin) , ['class' => 'form-control ', 'readonly' => 'readonly']) !!}
{!! Form::label('freeTimeDestination', 'Free Time Destination', [ 'class' => 'w-100 control-label', ]) !!}
{!! Form::number('freeTimeDestination', old('freeTimeDestination' , $maritimeFreightRate->freeTimeDestination), ['class' => 'form-control ', 'id' => 'freeTimeDestination', 'readonly' => 'readonly']) !!}
@if($maritimeFreightRate->carriers_id == 8)
@elseif($maritimeFreightRate->carriers_id == 33)
@elseif($maritimeFreightRate->carriers_id == 13)
@elseif($maritimeFreightRate->carriers_id == 17)
@elseif($maritimeFreightRate->carriers_id == 22)
@elseif($maritimeFreightRate->carriers_id == 24)
@elseif($maritimeFreightRate->carriers_id == 29)
@elseif($maritimeFreightRate->carriers_id == 38)
@endif
{!! Form::label('transitTime', 'Transit Time', [ 'class' => 'w-100 control-label', ]) !!}
{!! Form::number('transitTime', old('transitTime' , $maritimeFreightRate->transitTime), ['class' => 'form-control ', 'readonly' => 'readonly']) !!}
{!! Form::label('loading_ports_id', 'Loading Port', [ 'class' => 'w-100 control-label', ]) !!}
{!! Form::select('loading_ports_id[]', $select['loadingPorts'], old('loading_ports_id' , $maritimeFreightRate->loading_ports_id), ['class' => 'loading_ports_id form-control','multiple'=>'multiple']) !!}
{!! Form::label('port_destinations', 'Port of Destination', [ 'class' => 'w-100 control-label', ]) !!}
{!! Form::select('port_destinations', $select['destinationPort'], old('port_destinations' , $maritimeFreightRate->port_destinations), ['class' => 'port_destinations form-control','multiple'=>'multiple']) !!}
{!! Form::label('transhipments', 'Transhipments', [ 'class' => 'w-100 control-label', ]) !!}
{!! Form::select('fakeTP', $select['destinationPort'], old('transhipments', $maritimeFreightRate->transhipments), ['class' => 'transhipments form-control','multiple'=>'multiple']) !!}
{!! Form::label('container_types_id', 'Equipment Type', [ 'class' => 'w-100 control-label', ]) !!}
{!! Form::select('container_types_id', $select['containerType'], old('container_types_id' , $maritimeFreightRate->container_types_id), ['class' => 'containerType form-control','multiple'=>'multiple']) !!}
{!! Form::label('platforms_id', 'Product', [ 'class' => 'w-100 control-label', ]) !!}
{!! Form::select('platforms_id', $select['platform'], old('platforms_id', $maritimeFreightRate->platforms_id), ['class' => 'platform form-control','multiple'=>'multiple']) !!}
FEE COMMERCIAL LINK
@foreach($array1 as $classes)
- {{$classes}}
@endforeach
@foreach($array2 as $classes)
- {{$classes}}
@endforeach
@if($getOrigemFee)
@forelse ($getOrigemFee as $key => $fee)
@if($loop->first)
Origin Charges
{!! Form::label('maritimeValidadeFromOrigin1', 'Valid From', [ 'class' => 'w-100 control-label', ]) !!}
{!! Form::date('maritimeValidadeFromOrigin1', old('maritimeValidadeFromOrigin1', null), ['class' => 'form-control ', 'min' => '2019-01-01', 'max' => '2080-01-01', 'id' => 'code']) !!}
{!! Form::label('maritimeValidadeToOrigin2', 'Valid To', [ 'class' => 'w-100 control-label', ]) !!}
{!! Form::date('maritimeValidadeToOrigin2', old('maritimeValidadeToOrigin2', null), ['class' => 'form-control ', 'min' => '2019-01-01', 'max' => '2080-01-01', 'id' => 'code']) !!}
@endif
{{ Form::hidden('maritime_quote_codes_id[]', $fee->codeid) }}
{{ Form::hidden('OriginId[]', $fee->OriginId) }}
{{ Form::hidden('port[]', $maritimeFreightRate->loading_ports_id) }}
{!! Form::label('descricao', 'Fee Description', [ 'class' => 'w-100 control-label', ]) !!}
{!! Form::text('descricao[]', old('descricao[]', $fee->feeDescription) , ['class' => 'form-control ','readonly' => 'readonly']) !!}
{!! Form::label('currencies_id', 'Currency', [ 'class' => 'w-100 control-label', ]) !!}
{!! Form::select('currencies_id[]', $select['currency'] , old('currencies_id[]', $fee->currency), ['class' => 'form-control', 'readonly' => 'readonly']) !!}
{!! Form::label('price2', 'Amount 20\'', [ 'class' => 'w-100 control-label', ]) !!}
{!! Form::number('price2[]', old('price2[]', $fee->price2) , ['class' => 'form-control ' , 'step' => 'any' ,'readonly' => 'readonly']) !!}
{!! Form::label('price4', 'Amount 40\'', [ 'class' => 'w-100 control-label', ]) !!}
{!! Form::number('price4[]', old('price4[]', $fee->price4 ) , ['class' => 'form-control ' , 'step' => 'any' ,'readonly' => 'readonly']) !!}
{!! Form::label('maritimeValidadeFrom', 'Valid From', [ 'class' => 'w-100 control-label', ]) !!}
{!! Form::date('maritimeValidadeFrom[]', old('maritimeValidadeFrom[]', $fee->maritimeValidadeFrom), ['class' => 'form-control valideFromOriginFees', 'min' => '2019-01-01', 'max' => '2080-01-01', 'id' => 'code']) !!}
{!! Form::label('maritimeValidadeTo', 'Valid To', [ 'class' => 'w-100 control-label', ]) !!}
{!! Form::date('maritimeValidadeTo[]', old('maritimeValidadeTo[]', $fee->maritimeValidadeTo), ['class' => 'form-control valideToOOriginFees', 'min' => '2019-01-01', 'max' => '2080-01-01', 'id' => 'code']) !!}
{!! Form::label('maritime_quote_classes_id', 'Fee Co. Link', [ 'class' => 'w-100 control-label', ]) !!}
{!! Form::select('maritime_quote_classes_id[]', $select['maritimeClasses'] , old('maritime_quote_classes_id[]', $fee->class), ['class' => 'form-control ', 'id' => 'maritimeClasses']) !!}
{{ Form::hidden('FeeType[]', old('FeeType[]', $fee->FeeType)) }}
@empty
@endforelse
@else
Origin Charges - Not Found
@endif
@if(isset($getFee))
@forelse ($getFee as $key => $fee)
@if($loop->first)
Others Charges
{!! Form::label('maritimeValidadeTo1', 'Valid From', [ 'class' => 'w-100 control-label', ]) !!}
{!! Form::date('maritimeValidadeFrom1', old('maritimeValidadeFrom1', null), ['class' => 'form-control ', 'min' => '2019-01-01', 'max' => '2080-01-01', 'id' => 'code']) !!}
{!! Form::label('maritimeValidadeTo2', 'Valid To', [ 'class' => 'w-100 control-label', ]) !!}
{!! Form::date('maritimeValidadeTo2', old('maritimeValidadeTo2', null), ['class' => 'form-control ', 'min' => '2019-01-01', 'max' => '2080-01-01', 'id' => 'code']) !!}
@endif
{{ Form::hidden('maritime_quote_codes_idAbroad[]', $fee->codeid) }}
{{ Form::hidden('freightId[]', $fee->freighRateId) }}
{!! Form::label('descricaoAbroad', 'Fee Description', [ 'class' => 'w-100 control-label', ]) !!}
{!! Form::text('descricaoAbroad[]', old('descricaoAbroad[]', $fee->feeDescription) , ['class' => 'form-control ','readonly' => 'readonly']) !!}
{!! Form::label('currencies_idAbroad', 'Currency', [ 'class' => 'w-100 control-label', ]) !!}
{!! Form::select('currencies_idAbroad[]', $select['currency'] , old('currencies_idAbroad[]', $fee->currency), ['class' => 'form-control', 'readonly' => 'readonly']) !!}
{!! Form::label('price', 'Amount', [ 'class' => 'w-100 control-label', ]) !!}
{!! Form::number('price[]', old('price' , $fee->price) , ['class' => 'form-control ' , 'step' => '0.01','readonly' => 'readonly']) !!}
{!! Form::label('maritimeValidadeFromAbroad', 'Valid From', [ 'class' => 'w-100 control-label', ]) !!}
{!! Form::date('maritimeValidadeFromAbroad[]', old('maritimeValidadeFromAbroad[]', $fee->maritimeValidadeFrom), ['class' => 'form-control valideFromOthersFees', 'min' => '2019-01-01', 'max' => '2080-01-01']) !!}
{!! Form::label('maritimeValidadeToAbroad', 'Valid To', [ 'class' => 'w-100 control-label', ]) !!}
{!! Form::date('maritimeValidadeToAbroad[]', old('maritimeValidadeToAbroad[]', $fee->maritimeValidadeTo), ['class' => 'form-control valideToOthersFees', 'min' => '2019-01-01', 'max' => '2080-01-01', 'id' => 'code']) !!}
{!! Form::label('maritime_quote_classes_idAbroad', 'Fee Co. Link', [ 'class' => 'w-100 control-label', ]) !!}
{!! Form::select('maritime_quote_classes_idAbroad[]', $select['maritimeClasses'] , old('maritime_quote_classes_idAbroad[]', $fee->class), ['class' => 'form-control ', 'id' => 'maritimeClasses']) !!}
{{ Form::hidden('FeeTypeAbroad[]', old('FeeTypeAbroad[]', $fee->FeeType)) }}
@empty
@endforelse
@endif
@include('oceanFreightFee.script')
@endsection