@extends('layout.padrao')
@include('loading.paymentRequest.information_module')
@section('title', $title)
@section('content')
@if($errors->any())
Something Went Wrong. Please check the mandatory fields.
@foreach($errors->all() as $error)
{{ $error }}
@endforeach
@endif
@yield('logisticsInformation-block')
{{ Form::open(array('method' => 'post', 'files'=>true, 'enctype'=>'multipart/form-data', 'route'=>'storeStuffingPaymentRequest', 'id'=>'payment_create')) }}
{{method_field('post')}}
{{ csrf_field() }}
{{ Form::hidden('SAOE', $loadingRequest->SAOE) }}
{{ Form::hidden('loading_requests_id', $loadingRequest->id) }}
{{ Form::hidden('containerQty', $loadingRequest->containerQty) }}
{{ Form::hidden('blQty', $loadingRequest->blQty) }}
{{ Form::hidden('status', 'Requested') }}
{{ Form::hidden('payment_type', 'Stuffing') }}
{{ Form::hidden('loadingType' , 'STUFPAYREQ') }}
@yield('extra-payment')
@yield('Payment-date')
@yield('tooltipDetailsStuffing')
@if(isset($registers[0]))
@foreach($registers as $item)
@if($loop->first)
{{($item->cities->descricao ?? '-')}}
Estufagem: {{($item->stuffing_terminals->name ?? '-')}}
Entrega: {{($item->loading_terminals->descricao ?? '-')}}
@php $new_route='Y'; @endphp
Valid From: {{date_format(date_create($item->tankValidadeFrom),"d.m.Y") }} To: {{date_format(date_create($item->tankValidadeTo),"d.m.Y") }}
@else
@if($item->stuffing_terminal_id <> $registers[$loop->index -1]->stuffing_terminal_id ||
$item->cities_id <> $registers[$loop->index -1]->cities_id ||
$item->loading_terminals_id <> $registers[$loop->index - 1]->loading_terminals_id)
{{($item->cities->descricao ?? '-')}}
Estufagem: {{($item->stuffing_terminals->name ?? '-')}}
Entrega: {{($item->loading_terminals->descricao ?? '-')}}
@php $new_route='Y'; @endphp
Valid From: {{date_format(date_create($item->tankValidadeFrom),"d.m.Y") }} To: {{date_format(date_create($item->tankValidadeTo),"d.m.Y") }}
@endif
@endif
{{-- Left Margin Delivery rates --}}
@if ($loadingRequest->container_types_id <> 7)
@endif
{{-- Pre Stacking rates --}}
@if($loop->last)
@if(((count($registers)) % 2) == 0 )
@else
@endif
{{-- @if(((count($registers)) % 2) == 0 )
@endif --}}
@yield('bank-details')
@endif
@endforeach
@else
Stuffing Rate not registered.
Please, contact the responsible department.
@endif
@yield('footer-comments-attach')
@include('include.btn_registrar')
@include('loading.haulingPaymentRequest.script')
@endSection