Contract Info
{!! Form::label('traders_id', '*Trader', [ 'class' => 'w-100 control-label']) !!}
{!! Form::select('traders_id', $select['traders'],old('traders_id', $register->traders_id),['class'=>'form-control']) !!}
@if($errors->has('traders_id'))
{{$errors->first('traders_id')}}
@endif
{!! Form::label('buyers_id', '*Client / Buyer', [ 'class' => 'w-100 control-label']) !!}
{!! Form::select('buyers_id', $select['buyers'], old('buyers_id',$register->buyers_id), ['class' => 'dynamic_description form-control', 'data-dependent'=>'BuyerDescription' ]) !!}
{!! Form::label('buyer_reference', 'Buyer Reference', [ 'class' => 'w-100 control-label', ]) !!}
{!! Form::text('buyer_reference', old('buyer_reference', ($register->buyer_reference ?? null)), ['class' => 'form-control ', 'sytle' => 'text-transform:uppercase;' ]) !!}
{{--
--}}
{!! Form::label('port_destinations_id', '*Port of Destination', [ 'class' => ' control-label', 'style' =>'margin-bottom: 7px']) !!}
{!! Form::label('platforms_id', '*Product', [ 'class' => 'w-100 control-label']) !!}
{!! Form::select('platforms_id', $select['platform'], old('platforms_id',$register->platforms_id), ['class' => ' platform form-control dynamic_packingNet', 'data-dependent'=>'packing_types' ]) !!}
@can('contractDetailsPlatformFactory', App\Usuario::class)
{{((isset($register->platforms->ncm) && $register->platforms->ncm != null)? ('NCM: '. $register->platforms->ncm) : '')}}
{!! Form::label('platform_factories_id', 'Product Factory Reference', [ 'class' => 'w-100 control-label']) !!}
{!! Form::select('platform_factories_id', $select['platformFactory'], old('platform_factories_id',$register->platform_factories_id), ['class' => ' platform_factories form-control']) !!}
@endcan
{!! Form::label('brokers_id', 'Broker', [ 'class' => 'w-100 control-label']) !!}
{!! Form::select('brokers_id', $select['brokers'], old('brokers_id',($register->brokers_id ?? null)), ['class' => 'Broker form-control']) !!}
{!! Form::label('broker_reference', 'Broker Reference', [ 'class' => 'w-100 control-label', ]) !!}
{!! Form::text('broker_reference', old('brokers_id',null), ['class' => 'form-control ', 'sytle' => 'text-transform:uppercase;' ]) !!}
@if(Auth::user()->clients_id == 730)
{!! Form::label('broker_comission', 'Broker Comission (%)', [ 'class' => 'w-100 control-label', ]) !!}
{!! Form::number('broker_comission', old('broker_comission',($register->broker_comission ?? null)), ['class' => 'form-control ', 'sytle' => 'text-transform:uppercase;' ]) !!}
@if($register->crop_year != null)
{!! Form::label('crop_year', 'Crop Year', [ 'class' => 'w-100 control-label', ]) !!}
{!! Form::number('crop_year', old('crop_year',($register->crop_year ?? null)), ['class' => 'form-control ', 'sytle' => 'text-transform:uppercase;' ]) !!}
@endif
@endif
{{--
{!! Form::label('brands_id', 'Brand', [ 'class' => 'w-100 control-label']) !!}
{!! Form::select('brands_id', $select['brands'], old('brands_id',$register->brands_id), ['class' => 'brands form-control']) !!}
@if($errors->has('brands_id'))
{{$errors->first('brands_id')}}
@endif
--}}
@if(Auth::user()->clients_id == 244)
Seller's Details
@endif
{!! Form::label('name', 'Ship To Name', [ 'class' => 'control-label']) !!}
{!! Form::text('ShipToName', old('ShipToName', ($register->ship_to_ids->name ?? null)),['class'=>'form-control']) !!}
{!! Form::label('zipCode', 'Zip Code', [ 'class' => 'control-label']) !!}
{!! Form::text('zipCode', old('zipCode', ($register->ship_to_ids->zipCode ?? null)),['class'=>'form-control']) !!}
{!! Form::label('shipToCountries_id', 'Country', [ 'class' => 'control-label']) !!}
{!! Form::select('shipToCountries_id', $select['countries'], old('countries_id', ($register->ship_to_ids->countries_id ?? null)),['class'=>'form-control shipToCountries_id']) !!}
{!! Form::label('ShipTo_state_id', 'State ' , [ 'class' => 'w-100 control-label', ]) !!}
{!! Form::select('ShipTo_state_id', $select['state'], old('ShipTo_state_id', ($register->ship_to_ids->state_id ?? null)), ['class' => 'form-control ' , 'id'=> 'state_id'])!!}
{!! Form::label('ShipToCcities_id', 'City', [ 'class' => 'control-label']) !!}
{!! Form::select('ShipToCcities_id', $select['cities_shipto'], old('cities_id', $register->ship_to_ids->cities_id ?? null),['class'=>'form-control', 'id'=> 'city']) !!}
{!! Form::label('ShipToAddress', 'Address Line', [ 'class' => 'control-label']) !!}
{!! Form::textarea('ShipToAddress', old('address', $register->ship_to_ids->address ?? null),['class'=>'form-control', 'rows' => 2]) !!}
Payment
{!! Form::label('incoterms_id', '*Incoterm', [ 'class' => 'w-100 control-label']) !!}
{!! Form::select('incoterms_id', $select['incoterm'], old('incoterms_id',$register->incoterms_id), ['class' => 'incoterms form-control dynamic_description', 'data-dependent' => 'generalConditionsAndTerms']) !!}
{!! Form::label('currencies_id', '*Currency', [ 'class' => 'w-100 control-label']) !!}
{!! Form::select('currencies_id', $select['currency'], old('currencies_id',$register->currencies_id), ['class' => 'currencies form-control']) !!}
{!! Form::label('contract_payment_terms_id', '*Payment Terms', [ 'class' => 'w-100 control-label']) !!}
{!! Form::select('contract_payment_terms_id', $select['paymentTerms'], old('contract_payment_terms_id',$register->contract_payment_terms_id), ['class' => 'dynamic_description payment_terms form-control', 'data-dependent'=>'paymentDescription']) !!}
{!! Form::label('paymentDescription', 'Payment Description', [ 'class' => 'w-100 control-label']) !!}
{!! Form::textarea('paymentDescription', old('paymentDescription',$register->paymentDescription), ['id'=>'paymentDescription','class' => 'paymentDescription form-control', 'rows' => 8,'readonly'=>'readonly']) !!}
{!! Form::label('priceMtonTotal', 'Price m/Ton', [ 'class' => 'w-100 control-label']) !!}
{!! Form::text('priceMtonTotal', old('priceMtonTotal',$register->priceMtonTotal),['class' => 'form-control price-decimal','step'=>'any']) !!}
{!! Form::label('freightRateMton', 'Freight Rate m/ton', [ 'class' => 'w-100 control-label']) !!}
{!! Form::text('freightRateMton', old('priceMtonTotal',$register->freightRateMton),['class' => 'form-control price-decimal','step'=>'any']) !!}
{!! Form::label('insuranceMton', 'Insurance m/ton', [ 'class' => 'w-100 control-label']) !!}
{!! Form::text('insuranceMton', old('priceMtonTotal',$register->insuranceMton),['class' => 'form-control price-decimal','step'=>'any']) !!}
{!! Form::label('inlandCosts', 'Inland Costs m/ton ', [ 'class' => 'w-100 control-label']) !!}
{!! Form::text('inlandCosts', old('priceMtonTotal',$register->inlandCosts),['class' => 'form-control price-decimal','step'=>'any']) !!}
{!! Form::label('priceMtonCheck', 'Price m/ton Total', [ 'class' => 'w-100 control-label']) !!}
{!! Form::text('priceMtonCheck', old('priceMtonTotal',$register->priceMtonCheck),['class' => 'form-control price-decimal','readonly'=>'readonly','step'=>'any']) !!}
@endif
Shipping Info
{!! Form::label('shippingPeriodFrom', 'Shipping Period From', [ 'class' => 'w-100 control-label']) !!}
{!! Form::date('shippingPeriodFrom', $register->shippingPeriodFrom,['class' => 'form-control', 'min' => '2019-01-01', 'max' => '2080-01-01']) !!}
{!! Form::label('shippingPeriodTo', 'Shipping Period To', [ 'class' => 'w-100 control-label']) !!}
{!! Form::date('shippingPeriodTo', $register->shippingPeriodTo,['class' => 'form-control', 'min' => '2019-01-01', 'max' => '2080-01-01']) !!}
{!! Form::label('totalQtyT', 'Contract Total Net Weight (tons)', [ 'class' => 'w-100 control-label']) !!}
{!! Form::text('totalQtyT', $register->totalQtyT,['class' => 'form-control','step'=>'any']) !!}
{!! Form::label('packingContractDescription', 'Packing Contract Description', [ 'class' => 'w-100 control-label']) !!}
{!! Form::textarea('packingContractDescription', $register->packingContractDescription,['class' => 'form-control PackingTypeDescription','rows' => 6 ]) !!}
@if(Auth::user()->clients_id == 244)
{!! Form::label('net_tolerance_sysitems_id', 'Net Tolerance', [ 'class' => 'w-100 control-label', ]) !!}
{!! Form::select('contract_info[net_tolerance_sysitems_id]', $select['netTolerance'], old('contract_info[net_tolerance_sysitems_id]', ($register->contract_detail_extra_infos[0]->net_tolerance_sysitems_id ?? null)),['class'=>'form-control']) !!}
@endif
@can('contractDetailsPacking', App\Usuario::class)
@forelse($register->contract_packings as $key => $value)
{!! Form::label('packing_types_id', 'Packing Type', [ 'class' => 'w-100 control-label']) !!}
{!! Form::select('packing_types_id[]', $select['packingTypes'], old('packing_types_id',$value->packing_types_id), ['class' => 'dynamic_packingNet form-control packing_types', 'id'=>'packing_types','data-dependent'=>'packing_net_weights']) !!}
{!! Form::label('packing_net_weights', 'Packing Net Weight (kgs)', [ 'class' => 'w-100 control-label']) !!}
{!! Form::select('packing_net_weights[]', $select['packing_net_weights'], old('packing_net_weights',$value->packing_net_weights), ['class' => 'dynamic_description packing_net_weights form-control dynamic_tare', 'id'=>'packing_net_weights','data-dependent'=>'tare']) !!}
{!! Form::label('packing_tares_id', 'Packing Tare', [ 'class' => 'w-100 control-label']) !!}
{!! Form::number('tare[]', old('tare',$value->tare), ['id'=>'tare', 'class' => 'tare form-control', 'id'=>'tare','step'=>'0.01']) !!}
{!! Form::label('totalPackingUnits', 'Total Of Packing Units', [ 'class' => 'w-100 control-label']) !!}
{!! Form::number('totalPackingUnits[]', old('tare',$value->totalPackingUnits),['class' => 'totalPackingUnits_qty form-control', 'id'=>'totalPackingUnits']) !!}
@if ($loop->first)
@else
@endif
@empty
{!! Form::label('packing_types_id', 'Packing Type', [ 'class' => 'w-100 control-label']) !!}
{!! Form::select('packing_types_id[]', $select['packingTypes'], old('packing_types_id'), ['class' => 'dynamic_packingNet form-control packing_types', 'id'=>'packing_types','data-dependent'=>'packing_net_weights']) !!}
{!! Form::label('packing_net_weights', 'Packing Net Weight (kgs)', [ 'class' => 'w-100 control-label']) !!}
{!! Form::select('packing_net_weights[]', $select['packing_net_weights'], old('packing_net_weights'), ['class' => 'dynamic_description packing_net_weights form-control dynamic_tare', 'id'=>'packing_net_weights','data-dependent'=>'tare']) !!}
{!! Form::label('packing_tares_id', 'Packing Tare', [ 'class' => 'w-100 control-label']) !!}
{!! Form::number('tare[]', null, ['id'=>'tare', 'class' => 'tare form-control', 'id'=>'tare','step' => '0.01']) !!}
{!! Form::label('totalPackingUnits', 'Total Of Packing Units', [ 'class' => 'w-100 control-label']) !!}
{!! Form::number('totalPackingUnits[]', null,['class' => 'totalPackingUnits_qty form-control', 'id'=>'totalPackingUnits']) !!}
@endforelse
@endcan
@include('contractDetails.script')
@include('bibliotecas.numberFormatter')
@include('contractDetails.css')
@endSection