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

Stuffing Details (Detalhes do Processo)

@if( isset($stuffingProcess->stuffingProcessDetails) ) {{ 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($stuffingProcess->stuffingProcessDetails) || count($stuffingProcess->stuffingProcessDetails) == 0 ) @php $divNumber += 1; @endphp {{-- New Hauling Process--}} @include('stuffingProcess.form') @else {{-- Update a Hauling Process--}} @foreach($stuffingProcess->stuffingProcessDetails as $stuffingProcessDetails) {{-- @if(!(isset($stuffingProcessDetails->hauling_process_details_id)))--}} @if((isset($stuffingProcessDetails->axlesPlate))) @php $totalPreSent -= 1; @endphp @endif @endforeach @foreach($stuffingProcess->stuffingProcessDetails as $controlKey => $stuffingProcessDetails) @php $totalSent += 1; @endphp @if(!(isset($stuffingProcessDetails->hauling_process_details_id))) @php $divNumber += 1; @endphp @include('stuffingProcess.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('stuffingProcess.form_attachments')
    @foreach($loadingRequest->anexo_types as $stuffingProcessFiles) @php $divAttachNumber += 1; @endphp @if($stuffingProcessFiles->pivot->stage <> 'HP1' ) @continue @endif
  • - {{$stuffingProcessFiles->descricao}} ({{$stuffingProcessFiles->pivot->stage}}) - {{$stuffingProcessFiles->pivot->nmAnexo}}
  • @endforeach
@include('stuffingProcess.comments')
@endsection @include('stuffingProcess.script') @include('stuffingProcess.notification')