@extends('usuarios.clientes.master.layoutcliente') @section('conteudo') {{-- SELECT STYLE --}} @php header('Content-Type: text/html; charset=utf-8'); $i=0; $a=0; $camposMapa = \App\Models\CampoMapa::where('origem','Geral')->orderBy('prioridade','Asc')->get(); $cliente=\App\Models\Cliente::where('id',$dados->cliente_id)->first(); $Departamento= \App\Models\DepCliente::where('id',$dados->departamento_id)->first(); $OE=\App\Models\OrgaosDeEstrutura::where('id',$Departamento->orgaosdeestrutura_id)->first(); $SDs=\App\Models\ParametroDocumental::where('cliente_id',$dados->cliente_id)->get(); $linhasIndexs=\App\Models\LinhaIndexacao::where('usuario_id',Auth::id()) ->where('cliente_id',$dados->cliente_id) ->where('numerocaixa',$dados->numerodacaixa) ->select('codigo')->distinct('codigo')->get(); // try { // $caixa_id_form =Crypt::encryptString($dados->id); // } catch (DecryptException $e) { // $caixa_id_form=0; // } @endphp

Número da caixa:{{ $dados->numerodacaixa }}Data reservada: {{ $dados->created_at }}

Departamento: {{ $dados->departamento }}
Estado Actual: {{ $dados->estado }}
Índices

Linhas de Indexação
@if(isset($camposMapa)) @forelse($camposMapa as $cMapa) @if($cMapa->descricao=="Código da recolha") @elseif($cMapa->descricao=="C. Q.") @elseif($cMapa->nome=="funcionario_id") @else @php $i++; @endphp @endif @empty @endforelse @else @endif @if(isset($linhasIndexs)) @forelse($linhasIndexs as $linhasIndex) @php $a=$i; @endphp @foreach($camposMapa as $cMapa) @php $linhaIndex=\App\Models\LinhaIndexacao::where('usuario_id',Auth::id())->where('campomapa_id',$cMapa->id)->where('estadoindexacao','emprocesso')->where('codigo',$linhasIndex->codigo)->where('cliente_id',$empresa_cliente_id)->first(); @endphp @if($linhaIndex) @if($cMapa->nome=='orgaoestrutura_id') @php $OE1=\App\Models\OrgaosDeEstrutura::where('id',$linhaIndex->conteudo)->first(); $a=$a-1; @endphp @elseif($cMapa->nome=='departamento_id') @php $Dep= \App\Models\DepCliente::where('id',$linhaIndex->conteudo)->first(); $a=$a-1; @endphp @elseif($cMapa->nome=='seriedocumental_id') @php $SD1=\App\Models\ParametroDocumental::where('id',$linhaIndex->conteudo)->first(); $a=$a-1; @endphp @else @php $a=$a-1; @endphp @endif @endif @endforeach @if($a>=1) @for($z=$a;$z>=1;$z--) @endfor @endif @php //dd($a); $a=0; @endphp @empty @endforelse @else @endif
{{$cMapa->nome}}
{{$OE1->orgao}}{{$Dep->departamento}}{{$SD1->seriedoc}}{{$linhaIndex->conteudo}}

Total de Documentos

Índices 250
@endsection