@extends('layout.padrao')
@section('title', ' Trade Recaps Register')
@section('content')
@if (session('exception'))
@include('include.btn_registrar')
{!! Form::label('userName', 'User Name', [ 'class' => 'w-100 control-label', ]) !!}
{!! Form::text('userName', Auth::user()->nome, ['class' => 'form-control ', 'disabled'=>'disabled', 'sytle' => 'text-transform:uppercase;' ]) !!}
{!! Form::label('userLogin', 'User Login', [ 'class' => 'w-100 control-label', ]) !!}
{!! Form::text('userLogin', Auth::user()->login , ['class' => 'form-control ', 'disabled'=>'disabled', 'sytle' => 'text-transform:uppercase;' ]) !!}
{!! Form::label('platforms_id', 'Platform', [ 'class' => 'w-100 control-label']) !!}
{!! Form::select('platforms_id', $select['platform'], null, ['class' => ' platform_dynamic platforms form-control', 'data-dependent'=>'traders']) !!}
@if($errors->has('platforms_id'))
{{$errors->first('/')}}
@endif
{!! Form::label('traders_id', 'Trader', [ 'class' => 'w-100 control-label']) !!}
{!! Form::select('traders_id', $oldValues['traders_id'],old('traders_id', null),['class'=>'traders form-control']) !!}
@if($errors->has('traders_id'))
{{$errors->first('traders_id')}}
@endif
{!! Form::label('ship_to_id', 'Ship To', [ 'class' => 'w-100 control-label']) !!}
{!! Form::select('ship_to_id', $select['shipTo'], old('ship_to_id', null),['class'=>'ship_To form-control','multiple'=>'multiple']) !!}
@if($errors->has('ship_to_id'))
{{$errors->first('ship_to_id')}}
@endif
{!! Form::label('clients_id', 'Client', [ 'class' => 'w-100 control-label']) !!}
{!! Form::select('clients_id', $oldValues['clients_id'], old('clients_id',null), ['class' => 'dynamic_description clients form-control','multiple'=>'multiple', 'data-dependent'=>'clientDescription']) !!}
@if($errors->has('clients_id'))
{{$errors->first('clients_id')}}
@endif
{!! Form::label('brokers_id', 'Broker', [ 'class' => 'w-100 control-label']) !!}
{!! Form::select('brokers_id', $oldValues['brokers_id'], old('brokers_id'), ['class' => 'brokers form-control', 'data-dependent'=>'suppliers']) !!}
@if($errors->has('brokers_id'))
{{$errors->first('brokers_id')}}
@endif
{!! Form::label('clientDescription', 'Client Description', [ 'class' => 'w-100 control-label']) !!}
{!! Form::textarea('clientDescription', null, ['id'=>'clientDescription','class' => 'form-control', 'rows' => 3,'readonly'=>'readonly']) !!}
{!! Form::label('products_id', 'Product', [ 'class' => 'w-100 control-label']) !!}
{!! Form::select('products_id', $oldValues['products_id'], old('products_id'), ['class' => 'products form-control', 'data-dependent'=>'brands','multiple'=>'multiple']) !!}
@if($errors->has('products_id'))
{{$errors->first('products_id')}}
@endif
{!! Form::label('brands_id', 'Brand', [ 'class' => 'w-100 control-label']) !!}
{!! Form::select('brands_id', $oldValues['brands_id'], old('brands_id'), ['class' => 'brands form-control', 'data-dependent'=>'brokers','multiple'=>'multiple']) !!}
@if($errors->has('brands_id'))
{{$errors->first('brands_id')}}
@endif
{!! Form::label('currencies_id', 'Currency', [ 'class' => 'w-100 control-label']) !!}
{!! Form::select('currencies_id', $select['currency'], null, ['class' => 'currencies form-control']) !!}
@if($errors->has('currencies_id'))
{{$errors->first('currencies_id')}}
@endif
{!! Form::label('priceTon', 'Price/Ton', [ 'class' => 'w-100 control-label']) !!}
{!! Form::number('priceTon', null,['class' => 'form-control','step'=>'any']) !!}
@if($errors->has('priceTon'))
{{$errors->first('priceTon')}}
@endif
Payment / Shipping Info
{!! Form::label('payment_terms_id', 'Payment Terms', [ 'class' => 'w-100 control-label']) !!}
{!! Form::select('payment_terms_id', $select['paymentTerms'], null, ['class' => 'dynamic_description payment_terms form-control', 'data-dependent'=>'paymentDescription']) !!}
@if($errors->has('payment_terms_id'))
{{$errors->first('payment_terms_id')}}
@endif
{!! Form::label('incoterms_id', 'Incoterm', [ 'class' => 'w-100 control-label']) !!}
{!! Form::select('incoterms_id', $select['incoterm'], null, ['class' => 'incoterms form-control']) !!}
@if($errors->has('incoterms_id'))
{{$errors->first('incoterms_id')}}
@endif
{!! Form::label('paymentDescription', 'Payment Description', [ 'class' => 'w-100 control-label']) !!}
{!! Form::textarea('paymentDescription', null, ['id'=>'paymentDescription','class' => 'paymentDescription form-control', 'rows' => 5,'readonly'=>'readonly']) !!}
{!! Form::label('priceMtonTotal', 'Price m/Ton', [ 'class' => 'w-100 control-label']) !!}
{!! Form::number('priceMtonTotal', null,['class' => 'form-control','step'=>'any']) !!}
@if($errors->has('priceMtonTotal'))
{{$errors->first('priceMtonTotal')}}
@endif
{!! Form::label('freightRateMton', 'Freight Rate m/ton', [ 'class' => 'w-100 control-label']) !!}
{!! Form::number('freightRateMton', null,['class' => 'form-control','step'=>'any']) !!}
@if($errors->has('freightRateMton'))
{{$errors->first('freightRateMton')}}
@endif
{!! Form::label('insuranceMton', 'Insurance m/ton', [ 'class' => 'w-100 control-label']) !!}
{!! Form::number('insuranceMton', null,['class' => 'form-control','step'=>'any']) !!}
@if($errors->has('insuranceMton'))
{{$errors->first('insuranceMton')}}
@endif
{!! Form::label('inlandCosts', 'Inland Costs m/ton ', [ 'class' => 'w-100 control-label']) !!}
{!! Form::number('inlandCosts', null,['class' => 'form-control','step'=>'any']) !!}
@if($errors->has('inlandCosts'))
{{$errors->first('inlandCosts')}}
@endif
{!! Form::label('priceMtonCheck', 'Price m/ton Total', [ 'class' => 'w-100 control-label']) !!}
{!! Form::number('priceMtonCheck', null,['class' => 'form-control','readonly'=>'readonly','step'=>'any']) !!}
@if($errors->has('priceMtonCheck'))
{{$errors->first('priceMtonCheck')}}
@endif
{!! Form::label('countries_id', 'Country of Destination', [ 'class' => 'col6 control-label']) !!}
{!! Form::select('countries_id', $select['destinationCountry'], null, ['class' => ' dynamic2 countries form-control', 'data-dependent'=>'port_destinations']) !!}
@if($errors->has('countries_id'))
{{$errors->first('countries_id')}}
@endif
{!! Form::label('port_destinations_id', 'Port of Destination', [ 'class' => 'col6 control-label']) !!}
{!! Form::select('port_destinations_id', $oldValues['port_destinations_id'], old('port_destinations_id'), ['class' => 'port_destinations form-control','multiple'=>'multiple']) !!}
@if($errors->has('port_destinations_id'))
{{$errors->first('port_destinations_id')}}
@endif
{!! Form::label('qualitySpec', 'Quality Spec', [ 'class' => 'w-100 control-label']) !!}
{!! Form::textarea('qualitySpec', null, ['class' => 'form-control', 'rows' => 3]) !!}
@if($errors->has('qualitySpec'))
{{$errors->first('qualitySpec')}}
@endif
{!! Form::label('sample', 'Sample', [ 'class' => 'w-100 control-label']) !!}
{!! Form::select('sample', $select['sample'], null, ['class' => 'form-control']) !!}
{!! Form::label('totalQtyT', 'Contract Total Net Weight (tons)', [ 'class' => 'w-100 control-label']) !!}
{!! Form::number('totalQtyT', null,['class' => 'form-control','step'=>'any']) !!}
@if($errors->has('totalQtyT'))
{{$errors->first('totalQtyT')}}
@endif
{!! Form::label('grossWeight', 'Gross Weight (tons)', [ 'class' => 'w-100 control-label']) !!}
{!! Form::number('grossWeight', null,['class' => 'form-control','step'=>'any','readonly'=>'readonly']) !!}
@if($errors->has('grossWeight'))
{{$errors->first('grossWeight')}}
@endif
@if(old('packing_types_id'))
@for($i=0; $i < count(old('packing_types_id')) ; $i++)
@if($i==0)
{!! Form::label('packing_types_id', 'Packing Type', [ 'class' => 'w-100 control-label']) !!}
{!! Form::select('packing_types_id[]', $oldValues['packing_types_id'], old('packing_types_id.'.$i), ['class' => 'packing_types form-control']) !!}
{!! Form::label('packing_net_weights_id', 'Packing Net Weight (kgs)', [ 'class' => 'w-100 control-label']) !!}
{!! Form::select('packing_net_weights_id[]', $oldValues['packing_net_weights_id'], old('packing_net_weights_id.'.$i), ['class' => 'dynamic_tare packing_net_weights form-control', 'data-dependent'=>'packing_type_nets']) !!}
{!! Form::label('packing_tares_id', 'Packing Tare', [ 'class' => 'w-100 control-label']) !!}
{!! Form::number('packing_tares_id[]', old('packing_tares_id.'.$i), ['id'=>'packing_type_nets', 'class' => 'packing_type_nets packing_tares_id form-control','readonly'=>'readonly']) !!}
{!! Form::label('totalPackingUnits', 'Total Of Packing Units', [ 'class' => 'w-100 control-label']) !!}
{!! Form::number('totalPackingUnits[]', old('totalPackingUnits.'.$i),['class' => 'totalPackingUnits_qty form-control']) !!}
@else
{!! Form::label('packing_types_id', 'Packing Type', [ 'class' => 'w-100 control-label']) !!}
{!! Form::select('packing_types_id['.$i.']', $oldValues['packing_types_id'], old('packing_types_id.'.$i), ['class' => 'packing_types form-control']) !!}
{!! Form::label('packing_net_weights_id', 'Packing Net Weight (kgs)', [ 'class' => 'w-100 control-label']) !!}
{!! Form::select('packing_net_weights_id['.$i.']', $oldValues['packing_net_weights_id'], old('packing_net_weights_id.'.$i), ['class' => 'dynamic_tare packing_net_weights form-control', 'data-dependent'=>'packing_type_nets']) !!}
{!! Form::label('packing_tares_id', 'Packing Tare', [ 'class' => 'w-100 control-label']) !!}
{!! Form::number('packing_tares_id['.$i.']', old('packing_tares_id.'.$i), ['id'=>'packing_type_nets', 'class' => 'packing_type_nets packing_tares_id form-control','readonly'=>'readonly']) !!}
{!! Form::label('totalPackingUnits', 'Total Of Packing Units', [ 'class' => 'w-100 control-label']) !!}
{!! Form::number('totalPackingUnits['.$i.']', old('totalPackingUnits.'.$i),['class' => 'totalPackingUnits_qty form-control']) !!}
@endif
@endfor
@else
{!! Form::label('packing_types_id', 'Packing Type', [ 'class' => 'w-100 control-label']) !!}
{!! Form::select('packing_types_id[]', $oldValues['packing_types_id'], old('packing_types_id'), ['class' => 'packing_types form-control']) !!}
{!! Form::label('packing_net_weights_id', 'Packing Net Weight (kgs)', [ 'class' => 'w-100 control-label']) !!}
{!! Form::select('packing_net_weights_id[]', $oldValues['packing_net_weights_id'], old('packing_net_weights_id'), ['class' => 'dynamic_tare packing_net_weights form-control', 'data-dependent'=>'packing_type_nets']) !!}
{!! Form::label('packing_tares_id', 'Packing Tare', [ 'class' => 'w-100 control-label']) !!}
{!! Form::number('packing_tares_id[]', null, ['id'=>'packing_type_nets', 'class' => 'packing_type_nets packing_tares_id form-control','readonly'=>'readonly']) !!}
{!! Form::label('totalPackingUnits', 'Total Of Packing Units', [ 'class' => 'w-100 control-label']) !!}
{!! Form::number('totalPackingUnits[]', null,['class' => 'totalPackingUnits_qty form-control']) !!}
@endif
@if(old('loading_ports_id'))
@for($i=0; $i < count(old('loading_ports_id')) ; $i++)
@if($i==0)
{!! Form::label('suppliers_id', 'Supplier', [ 'class' => 'w-100 control-label']) !!}
{!! Form::select('suppliers_id[]', $oldValues['suppliers_id'], old('suppliers_id.'.$i), ['class' => 'suppliers form-control']) !!}
{!! Form::label('loading_plants_id', 'Loading Plant', [ 'class' => 'col6 control-label', ]) !!}
{!! Form::select('loading_plants_id[]', $oldValues['loading_plants_id'], old('loading_plants_id.'.$i), ['class' => 'loading_plants form-control','multiple'=>'multiple']) !!}
{!! Form::label('loading_ports_id', 'Loading Port', [ 'class' => 'col6 control-label', ]) !!}
{!! Form::select('loading_ports_id[]', $select['loadingPorts'], old('loading_ports_id.'.$i), ['class' => 'loading_ports_id form-control']) !!}
@else
{!! Form::label('suppliers_id', 'Supplier', [ 'class' => 'w-100 control-label']) !!}
{!! Form::select('suppliers_id['.$i.']', $oldValues['suppliers_id'], old('suppliers_id.'.$i), ['class' => 'suppliers form-control']) !!}
{!! Form::label('loading_plants_id', 'Loading Plant', [ 'class' => 'col6 control-label', ]) !!}
{!! Form::select('loading_plants_id['.$i.']', $oldValues['loading_plants_id'], old('loading_plants_id.'.$i), ['class' => 'loading_plants form-control']) !!}
{!! Form::label('loading_ports_id', 'Loading Port', [ 'class' => 'col6 control-label', ]) !!}
{!! Form::select('loading_ports_id['.$i.']', $select['loadingPorts'], old('loading_ports_id.'.$i), ['class' => 'loading_ports_id form-control']) !!}
@endif
@endfor
@else
{!! Form::label('suppliers_id', 'Supplier', [ 'class' => 'w-100 control-label']) !!}
{!! Form::select('suppliers_id[]', $oldValues['suppliers_id'], old('suppliers_id'), ['class' => 'suppliers form-control']) !!}
{!! Form::label('loading_plants_id', 'Loading Plant', [ 'class' => 'col6 control-label', ]) !!}
{!! Form::select('loading_plants_id[]', $oldValues['loading_plants_id'], old('loading_plants_id'), ['class' => 'loading_plants form-control']) !!}
{!! Form::label('loading_ports_id', 'Loading Port', [ 'class' => 'col6 control-label', ]) !!}
{!! Form::select('loading_ports_id[]', $select['loadingPorts'], null, ['class' => 'loading_ports_id form-control']) !!}
@endif
{!! Form::label('shippingPeriodFrom', 'Shipping Period From', [ 'class' => 'w-100 control-label']) !!}
{!! Form::date('shippingPeriodFrom', null,['class' => 'form-control', 'min' => '2019-01-01', 'max' => '2080-01-01']) !!}
@if($errors->has('shippingPeriodFrom'))
{{$errors->first('shippingPeriodFrom')}}
@endif
{!! Form::label('shippingPeriodTo', 'Shipping Period To', [ 'class' => 'w-100 control-label']) !!}
{!! Form::date('shippingPeriodTo', null,['class' => 'form-control', 'min' => '2019-01-01', 'max' => '2080-01-01']) !!}
@if($errors->has('shippingPeriodTo'))
{{$errors->first('shippingPeriodTo')}}
@endif
Qty Per Month
@if(old('dtfrom'))
@for($i=0; $i < count(old('dtfrom')) ; $i++)
{!! Form::label('dtfrom', 'From', [ 'class' => 'w-100 control-label']) !!}
{!! Form::date('dtfrom[]', old('dtfrom['.$i.']'),['class' => $element . 'b form-control', 'min' => '2019-01-01', 'max' => '2080-01-01']) !!}
@if($errors->has('dtfrom.*'))
{{$errors->first('dtfrom.*')}}
@endif
{!! Form::label('dtto', 'To', [ 'class' => 'w-100 control-label']) !!}
{!! Form::date('dtto[]', old('dtfrom['.$i.']'),['class' => 'form-control', 'min' => '2019-01-01', 'max' => '2080-01-01']) !!}
@if($errors->has('dtto.*'))
{{$errors->first('dtto.*')}}
@endif
{!! Form::label('qtyTons', 'Qty (tons)', [ 'class' => 'w-100 control-label']) !!}
{!! Form::number('qtyTons[]', old('dtfrom['.$i.']'),['class' => 'form-control']) !!}
@if($errors->has('qtyTons.*'))
{{$errors->first('qtyTons.*')}}
@endif
@endfor
@else
{!! Form::label('dtfrom', 'From', [ 'class' => 'w-100 control-label']) !!}
{!! Form::date('dtfrom[]', null,['class' => 'form-control', 'min' => '2019-01-01', 'max' => '2080-01-01']) !!}
@if($errors->has('dtfrom.0'))
{{$errors->first('dtfrom.0')}}
@endif
{!! Form::label('dtto', 'To', [ 'class' => 'w-100 control-label']) !!}
{!! Form::date('dtto[]', null,['class' => 'form-control', 'min' => '2019-01-01', 'max' => '2080-01-01']) !!}
@if($errors->has('dtto.0'))
{{$errors->first('dtto.0')}}
@endif
{!! Form::label('qtyTons', 'Qty (tons)', [ 'class' => 'w-100 control-label']) !!}
{!! Form::number('qtyTons[]', null,['class' => 'form-control']) !!}
@if($errors->has('qtyTons.0'))
{{$errors->first('qtyTons.0')}}
@endif
@endif
{!! Form::label('totalQty', 'Qty Total (tons)', [ 'class' => 'w-100 control-label']) !!}
{!! Form::text('totalQty', null,['class' => 'form-control', 'readonly'=>'readonly']) !!}
@if($errors->has('totalQty'))
{{$errors->first('totalQty')}}
@endif
Attachment / Comments
@if($errors->has('filename'))
@if (count($errors) > 0)
Whoops! There were some problems with your input.
- Extensões Válidas:doc,pdf,docx,zip,xml,xls,xlsx,png,ppt,mpeg,js,jpeg,jpg,csv,gif,txt
- Tamanho Máximo:300MB
@endif
@endif
{!! Form::select('anexo_types_id[]',$select['anexoTypes'], null, ['class' => 'form-control']) !!}
{!! Form::label('comments', 'Comments', [ 'class' => 'w-100 control-label']) !!}
{!! Form::textarea('comments', $value = null, ['class' => 'form-control', 'rows' => 3]) !!}
@include('include.btn_registrar')
{{ Form::close() }}