@extends('layout.padrao') @section('title', 'Hauling Process (Processo Transportadora)') @section('content') @include('haulingProcess.bookinginformation') @if($errors->any())
@foreach($errors->all() as $error) {{ $error }}
@endforeach
@endif

Hauling Details (Detalhes do Processo)

@if( isset($haulingProcess->haulingProcessDetails) ) {{ method_field('PUT') }} @endif {{ csrf_field() }} {{-- This variable control all inputs names--}} @php $controlKey = 0; $divNumber = 0; $divAttachNumber = 0; $totalSent = 0; $totalPreSent = $loadingRequest->containerQty; @endphp @if( !isset($haulingProcess->haulingProcessDetails) || count($haulingProcess->haulingProcessDetails) == 0 ) @php $divNumber += 1; @endphp {{-- New Hauling Process--}} @include('haulingProcess.form') @else {{-- Update a Hauling Process--}} @foreach($haulingProcess->haulingProcessDetails as $haulingProcessDetails) {{-- @if(!(isset($haulingProcessDetails->hauling_process_details_id)))--}} @if((isset($haulingProcessDetails->axlesPlate))) @php $totalPreSent -= 1; @endphp @endif @endforeach @foreach($haulingProcess->haulingProcessDetails as $controlKey => $haulingProcessDetails) @php $totalSent += 1; @endphp @if(!(isset($haulingProcessDetails->hauling_process_details_id))) @php $divNumber += 1; @endphp @include('haulingProcess.form') @endif @endforeach @endif
@if($totalPreSent > 0)
@endif

Qtd Total Solicitada: {{(isset($loadingRequest->containerQty)) ? $loadingRequest->containerQty : '0'}} cntr

Qtd Total Enviada: {{(isset($totalSent)) ? (($totalSent) == 0 ? 1 : $totalSent ) : '1'}} cntr

Qtd Restante: {{(isset($loadingRequest->containerQty)) ? (($loadingRequest->containerQty - $totalSent)) : ''}} cntr

Attachments / Comments (Anexos / Comentários)

@php $divAttachNumber = 1; @endphp @include('haulingProcess.form_attachments')
    @foreach($loadingRequest->anexo_types as $haulingProcessFiles) @php $divAttachNumber += 1; @endphp @if($haulingProcessFiles->pivot->stage <> 'HP1' ) @continue @endif
  • - {{$haulingProcessFiles->descricao}} ({{$haulingProcessFiles->pivot->stage}}) - {{$haulingProcessFiles->pivot->nmAnexo}}
  • @endforeach
@include('haulingProcess.comments')
@endsection @include('haulingProcess.script') @include('haulingProcess.notification')