This commit is contained in:
@@ -0,0 +1,227 @@
|
||||
@extends('impressoes.layout1.content')
|
||||
|
||||
@section('conteudo')
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<b>Data Saída: </b>{{ $data['viagem']->data }}
|
||||
</td>
|
||||
<td>
|
||||
@if (isset($data['viagem']->jornada_horario_inicial))
|
||||
<b>Horário Inicial: </b>{{ $data['viagem']->jornada_horario_inicial }}
|
||||
@else
|
||||
<b>Horário Saída: </b>{{ substr($data['viagem']->horario_saida, 0, -3) }}
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
<b>Protocolo:</b> {{ $data['viagem']->protocolo }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<b>Veículo: </b>{{ $data['viagem']->veiculo }}
|
||||
</td>
|
||||
<td>
|
||||
<b>Motorista: </b>{{ $data['viagem']->motorista }}
|
||||
</td>
|
||||
<td>
|
||||
<b>Diária: </b>{{ $data['viagem']->diaria ? 'R$' . $data['viagem']->diaria : '' }}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table valign=top class="no-border">
|
||||
@php
|
||||
$gruposOrdenados = $data['pacientes']
|
||||
->groupBy($data['agrupar'])
|
||||
->sortKeys();
|
||||
@endphp
|
||||
|
||||
@foreach ($gruposOrdenados as $agrupar => $pacientes)
|
||||
<tr class="no-border">
|
||||
<td class="no-border">
|
||||
<table class="table-auto report-container" style="">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="bg-destaque" colspan="10">
|
||||
@if($data['agrupar'] == 'destino')
|
||||
<b>Destino:</b> {{$pacientes[0]->destino}}
|
||||
| <b>Total de Pacientes:</b> {{ $pacientes->count() }}
|
||||
| <b>Total de Passageiros:</b> {{ $pacientes->sum('acompanhante') + $pacientes->count() }}
|
||||
@if($data['agrupar'] == 'destino')
|
||||
| <b>Distância</b>:
|
||||
@if(isset($pacientes[0]->distancia))
|
||||
{{$pacientes[0]->distancia}} km
|
||||
@else
|
||||
Não informada
|
||||
@endif
|
||||
@endif
|
||||
@elseif($data['agrupar'] == 'municipio')
|
||||
<b>Município:</b> {{$pacientes[0]->municipio}}
|
||||
@elseif($data['agrupar'] == 'ponto')
|
||||
<b>Ponto:</b> {{$pacientes[0]->ponto}}
|
||||
@endif
|
||||
</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>Paciente</b></td>
|
||||
<td><b>Acompanhante</b></td>
|
||||
@if($data['agrupar'] != 'destino')
|
||||
<td><b>Destino</b></td>
|
||||
@endif
|
||||
@if($data['agrupar'] != 'ponto')
|
||||
<td><b>Ponto</b></td>
|
||||
@endif
|
||||
@if($data['agrupar'] != 'municipio')
|
||||
<td><b>Município</b></td>
|
||||
@endif
|
||||
<td><b>Horário de saída</b></td>
|
||||
<td><b>Horário da consulta</b></td>
|
||||
<td><b>Motivo</b></td>
|
||||
@if($data['exibir_observacao_paciente'])
|
||||
<td><b>Obs. do Paciente</b></td>
|
||||
@endif
|
||||
<td><b>Obs. do Transporte</b></td>
|
||||
<td><b>Celular</b></td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="report-content">
|
||||
@php
|
||||
$pacientesOrdenados = $pacientes->sortBy($data['ordenar']);
|
||||
@endphp
|
||||
|
||||
@foreach ($pacientesOrdenados as $paciente)
|
||||
<tr>
|
||||
<td>{{ $paciente->nome }}</td>
|
||||
<td><mark><b>{{ $paciente->acompanhante ? $paciente->acompanhante : '0' }}</b></mark></td>
|
||||
@if($data['agrupar'] != 'destino')
|
||||
<td>{{ $paciente->destino }}</td>
|
||||
@endif
|
||||
@if($data['agrupar'] != 'ponto')
|
||||
<td>
|
||||
@if($paciente->ponto)
|
||||
<b>{{ $paciente->ponto . (str_contains($paciente->ponto, 'CASA DO PACIENTE') ? ' - BAIRRO ' . $paciente->bairro : '') }}</b>
|
||||
@else
|
||||
<b>{{ 'BAIRRO ' . $paciente->bairro }}</b>
|
||||
@endif
|
||||
</td>
|
||||
@endif
|
||||
@if($data['agrupar'] != 'municipio')
|
||||
<td>{{ $paciente->municipio }}</td>
|
||||
@endif
|
||||
<td><mark><b>{{ substr($paciente->horario_saida, 0, -3) }}</b></mark></td>
|
||||
<td><b>{{ substr($paciente->horario_consulta, 0, -3) }}</b></td>
|
||||
<td>{{ $paciente->motivo }}</td>
|
||||
@if($data['exibir_observacao_paciente'])
|
||||
<td><mark><b>{{ $paciente->observacao }}</b></mark></td>
|
||||
@endif
|
||||
<td><mark><b>{{ $paciente->consulta_observacao }}</b></mark></td>
|
||||
<td><b>{{ $paciente->telefones }}</b></td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</table>
|
||||
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<b>Saida - Hora:</b>
|
||||
</td>
|
||||
<td colspan="2">
|
||||
<b>Estrada</b>
|
||||
</td>
|
||||
<td colspan="2">
|
||||
<b>Retorno - Hora</b>
|
||||
</td>
|
||||
<td colspan="2">
|
||||
<b>Média</b>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<b>KM</b>
|
||||
</td>
|
||||
<td>
|
||||
<b>Litros</b>
|
||||
</td>
|
||||
<td>
|
||||
<b>KM</b>
|
||||
</td>
|
||||
<td>
|
||||
<b>Litros</b>
|
||||
</td>
|
||||
<td>
|
||||
<b>KM</b>
|
||||
</td>
|
||||
<td>
|
||||
<b>Litros</b>
|
||||
</td>
|
||||
<td>
|
||||
<b>KM Percorridos</b>
|
||||
</td>
|
||||
<td>
|
||||
<b>KM/Litro</b>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="row" style="margin-top:10px;">
|
||||
<div class="col-12">
|
||||
DECLARAMOS, SOB AS PENAS DA LEI, QUE AS INFORMAÇÕES PRESTADAS NESTA PLANILHA SÃO VERDADEIRAS.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" style="margin-top:64px;">
|
||||
<div class="col-4">
|
||||
Despesas:
|
||||
</div>
|
||||
<div class="col-4">
|
||||
Total de Passageiros: {{ $data['total'] }}
|
||||
</div>
|
||||
<div class="col-4" style="text-align: center;">
|
||||
_____________________________________<br>
|
||||
Assinatura Motorista
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
body {
|
||||
font-family: Helvetica, arial, sans-serif;
|
||||
}
|
||||
|
||||
table {
|
||||
margin-bottom: 15px;
|
||||
font-size: 12px;
|
||||
table-layout: fixed;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
.table-auto {
|
||||
table-layout: auto;
|
||||
}
|
||||
|
||||
tr,
|
||||
td {
|
||||
border: 1px solid black;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.no-border {
|
||||
border: none !important;
|
||||
padding: 0px !important;
|
||||
margin: 0px !important
|
||||
}
|
||||
|
||||
.bg-destaque {
|
||||
background-color: #cccccc;
|
||||
}
|
||||
</style>
|
||||
@endsection
|
||||
@@ -0,0 +1,229 @@
|
||||
@extends('impressoes.layout1.content')
|
||||
|
||||
@section('conteudo')
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td><b>Data Saída: </b>{{ $data['viagem']->data }}</td>
|
||||
<td><b>Status: </b>{{ ['', 'Aberto', 'Finalizado'][$data['viagem']->status] }}</td>
|
||||
<td><b>Veículo: </b>{{ $data['viagem']->veiculo }}</td>
|
||||
<td><b>Protocolo:</b> {{ $data['viagem']->protocolo }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>Motorista: </b>{{ $data['viagem']->motorista }} {{ $data['viagem']->matricula ? ' - ' . $data['viagem']->matricula : '' }}</td>
|
||||
<td><b>Diária: </b>{{ $data['viagem']->diaria ? 'R$' . $data['viagem']->diaria : '' }}</td>
|
||||
<td colspan="2"><b>Horário Saída: </b>{{ substr($data['viagem']->horario_saida_temp, 0, -3) }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>Horário Previsto da Jornada:</b> {{ $data['viagem']->jornada }}</td>
|
||||
<td><b>Horário Chegada Destino: </b>{{ substr($data['viagem']->horario_chegada_destino, 0, -3) }}</td>
|
||||
<td colspan="2"><b>Horário Saída Destino: </b>{{ substr($data['viagem']->horario_saida_destino, 0, -3) }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>Chegada: </b>{{ substr($data['viagem']->horario_chegada, 0, -3) }}</td>
|
||||
<td><b>Km Saída: </b>{{ $data['viagem']->km_saida }}</td>
|
||||
<td colspan="2"><b>Km Chegada: </b>{{ $data['viagem']->km_chegada }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
@php
|
||||
$gruposOrdenados = $data['pacientes']
|
||||
->groupBy($data['agrupar'])
|
||||
->sortKeys();
|
||||
@endphp
|
||||
|
||||
@foreach ($gruposOrdenados as $agrupar => $pacientes)
|
||||
|
||||
<div class="grupo-container">
|
||||
|
||||
<table class="report-container">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="bg-destaque" colspan="4">
|
||||
@if($data['agrupar'] == 'destino')
|
||||
<b>Destino:</b> {{$pacientes[0]->destino}}
|
||||
@elseif($data['agrupar'] == 'municipio')
|
||||
<b>Município:</b> {{$pacientes[0]->municipio}}
|
||||
@elseif($data['agrupar'] == 'ponto')
|
||||
<b>Ponto:</b> {{$pacientes[0]->ponto}}
|
||||
@endif
|
||||
<br>
|
||||
Total de Pacientes: {{ $pacientes->count() }} |
|
||||
Total de Passageiros: {{ $pacientes->sum('acompanhante') + $pacientes->count() }}
|
||||
|
||||
@if($data['agrupar'] == 'destino')
|
||||
| Distância:
|
||||
{{ $pacientes[0]->distancia ?? 'Não informada' }} km
|
||||
@endif
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
|
||||
@php
|
||||
$pacientesOrdenados = $pacientes->sortBy($data['ordenar']);
|
||||
@endphp
|
||||
|
||||
@foreach ($pacientesOrdenados as $paciente)
|
||||
|
||||
<div class="paciente-container">
|
||||
<table class="report-container">
|
||||
|
||||
<tr>
|
||||
<td class="bg-destaque"><strong>{{ $paciente->nome }}</strong></td>
|
||||
<td>Idade: {{ $paciente->cidadao_idade_anos }} ano(s)</td>
|
||||
<td colspan="2">Endereço: {{ $paciente->endereco }}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Loteamento/Subdistrito:</td>
|
||||
<td>Complemento: {{ $paciente->complemento }}</td>
|
||||
<td colspan="2">Bairro: {{ $paciente->bairro }}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Motivo da Viagem: {{ $paciente->motivo }}</td>
|
||||
<td><b>Hora da Consulta: {{ substr($paciente->horario_consulta, 0, -3) }}</b></td>
|
||||
<td><mark><b>Hora Saída: {{ substr($paciente->horario_saida, 0, -3) }}</b></mark></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><mark><b>Acompanhante(s):</b> {{ $paciente->acompanhante ?? 0 }}</mark></td>
|
||||
|
||||
@if($data['exibir_observacao_paciente'])
|
||||
<td><mark><b>Obs. do Paciente:</b> {{ $paciente->observacao }}</mark></td>
|
||||
<td colspan="2"><b>Tel.: {{ $paciente->telefones }}</b></td>
|
||||
@else
|
||||
<td colspan="3"><b>Tel.: {{ $paciente->telefones }}</b></td>
|
||||
@endif
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
@if($data['agrupar'] == 'destino')
|
||||
<td><b>Ponto:</b> {{ $paciente->ponto }}</td>
|
||||
<td><b>Município:</b> {{ $paciente->municipio }}</td>
|
||||
@elseif($data['agrupar'] == 'ponto')
|
||||
<td><b>Município:</b> {{ $paciente->municipio }}</td>
|
||||
<td><b>Destino:</b> {{ $paciente->destino }}</td>
|
||||
@elseif($data['agrupar'] == 'municipio')
|
||||
<td><b>Ponto:</b> {{ $paciente->ponto }}</td>
|
||||
<td><b>Destino:</b> {{ $paciente->destino }}</td>
|
||||
@endif
|
||||
<td><b>Total:</b> {{ $paciente->acompanhante + 1 }}</td>
|
||||
</tr>
|
||||
|
||||
{{-- ACOMPANHANTES --}}
|
||||
@if ($paciente->acompanhante > 0)
|
||||
<tr>
|
||||
<td><strong>Acompanhante 1:</strong> {{ $paciente->nome_1 ?? $paciente->acompanhante_nome_1 }}</td>
|
||||
<td>CNS: {{ $paciente->acompanhante_cns_1 }}</td>
|
||||
<td colspan="2">Tel.: {{ $paciente->telefones_acompanhante_1 }}</td>
|
||||
</tr>
|
||||
@endif
|
||||
|
||||
@if ($paciente->acompanhante == 2)
|
||||
<tr>
|
||||
<td><strong>Acompanhante 2:</strong> {{ $paciente->nome_2 ?? $paciente->acompanhante_nome_2 }}</td>
|
||||
<td>CNS: {{ $paciente->acompanhante_cns_2 }}</td>
|
||||
<td colspan="2">Tel.: {{ $paciente->telefones_acompanhante_2 }}</td>
|
||||
</tr>
|
||||
@endif
|
||||
|
||||
<tr>
|
||||
<td><mark><b>Obs. do Transporte:</b> {{ $paciente->consulta_observacao }}</mark></td>
|
||||
<td colspan="3">Consulta/Exame Realizado: ( ) Sim ( ) Não</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="4">Assinatura:</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@endforeach
|
||||
|
||||
</div>
|
||||
|
||||
@endforeach
|
||||
|
||||
<div style="page-break-inside: avoid; margin-top: 10px;">
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td><b>Refeição: </b>{{ $data['viagem']->refeicao ? 'R$' . $data['viagem']->refeicao : '' }}</td>
|
||||
<td><b>Pernoite: </b>{{ $data['viagem']->pernoite ? 'R$' . $data['viagem']->pernoite : '' }}</td>
|
||||
<td><b>Combustível: </b>{{ $data['viagem']->combustivel ? 'R$' . $data['viagem']->combustivel : '' }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>Pedágio: </b>{{ $data['viagem']->pedagio ? 'R$' . $data['viagem']->pedagio : '' }}</td>
|
||||
<td><b>Outras Despesas: </b>{{ $data['viagem']->outras_despesas ? 'R$' . $data['viagem']->outras_despesas : '' }}</td>
|
||||
<td><b>Total Despesas: </b>{{ $data['viagem']->total_despesa ? 'R$' . $data['viagem']->total_despesa : '' }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3"><b>Total Passageiros: </b>{{ $data['total'] }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div style="margin-top:10px;">
|
||||
DECLARAMOS, SOB AS PENAS DA LEI, QUE AS INFORMAÇÕES PRESTADAS NESTA PLANILHA SÃO VERDADEIRAS.
|
||||
</div>
|
||||
|
||||
<div style="margin-top:64px; width:100%;">
|
||||
<div style="width:48%; float:left; text-align:center;">
|
||||
_____________________________________________<br>
|
||||
<b>Assinatura Servidor</b>
|
||||
</div>
|
||||
|
||||
<div style="width:48%; float:right; text-align:center;">
|
||||
_____________________________________________<br>
|
||||
<b>Carimbo/Assinatura do Responsável</b>
|
||||
</div>
|
||||
|
||||
<div style="clear: both;"></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<style>
|
||||
body {
|
||||
font-family: Helvetica, Arial, sans-serif;
|
||||
padding: 0 20px;
|
||||
}
|
||||
|
||||
table {
|
||||
width: 100%;
|
||||
margin-bottom: 10px;
|
||||
font-size: 13px;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
td,
|
||||
th {
|
||||
border: 1px solid black;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.bg-destaque {
|
||||
background-color: #ccc;
|
||||
}
|
||||
|
||||
.grupo-container {
|
||||
page-break-inside: avoid;
|
||||
}
|
||||
|
||||
.paciente-container {
|
||||
page-break-inside: avoid;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.report-container {
|
||||
page-break-inside: avoid;
|
||||
}
|
||||
|
||||
thead {
|
||||
display: table-header-group;
|
||||
}
|
||||
</style>
|
||||
|
||||
@endsection
|
||||
@@ -0,0 +1,135 @@
|
||||
@extends('impressoes.layout1.content')
|
||||
|
||||
@section('conteudo')
|
||||
<style>
|
||||
.table-relatorio > thead > tr > th,
|
||||
.table-relatorio > tfoot > tr > th { text-align: center; }
|
||||
.col-min { width: 1%; }
|
||||
.text-center { text-align: center; }
|
||||
.sub-title > tr > th { color: #222}
|
||||
.sub-item > tr > td { color: #333}
|
||||
</style>
|
||||
|
||||
<fieldset>
|
||||
<legend>Filtros olá</legend>
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
<strong>Período:</strong>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<strong>Município:</strong>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
{{ \Illuminate\Support\Carbon::parse($periodo['start'])->format('d/m/Y') }} à {{ \Illuminate\Support\Carbon::parse($periodo['end'])->format('d/m/Y') }}
|
||||
</div>
|
||||
<div class="col-6">
|
||||
{{ $municipio }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
<strong>Destino:</strong>
|
||||
</div>
|
||||
|
||||
<div class="col-3">
|
||||
<strong>Horário de saída:</strong>
|
||||
</div>
|
||||
|
||||
<div class="col-3">
|
||||
<strong>Paciente:</strong>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
{{ $destino }}
|
||||
</div>
|
||||
|
||||
<div class="col-3">
|
||||
{{ $horario }}
|
||||
</div>
|
||||
|
||||
<div class="col-3">
|
||||
{{ $paciente }}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</fieldset>
|
||||
|
||||
<table class="table table-relatorio">
|
||||
<thead>
|
||||
<tr>
|
||||
@foreach ($colunas as $coluna)
|
||||
<th class="{{ $coluna['class'] }}">{{ $coluna['label'] }}</th>
|
||||
@endforeach
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
@foreach ($items as $item)
|
||||
<tr>
|
||||
@foreach ($colunas as $coluna)
|
||||
<td class="{{ $coluna['class'] }}" style="color: #111;"><b>{{ $item[$coluna['key']] ?? '-' }}</b></td>
|
||||
@endforeach
|
||||
</tr>
|
||||
|
||||
@if (count($item['historico']) > 0)
|
||||
<tr>
|
||||
<td colspan="{{ $colunas->count() }}">
|
||||
<table class="table">
|
||||
<thead class="sub-title">
|
||||
<tr><th colspan="9" style="text-align: center">Movimentações do paciente {{$paciente}}</th></tr>
|
||||
<tr>
|
||||
<th>Usuário que Cadastrou</th>
|
||||
<th>Usuário que Alterou</th>
|
||||
<th>Destino</th>
|
||||
<th>Veículo</th>
|
||||
<th>Acompanhantes</th>
|
||||
<th>Data/hora da saída</th>
|
||||
<th>Motivo viagem</th>
|
||||
<th>Status</th>
|
||||
<th>Data/hora da Modificação</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="sub-item">
|
||||
@foreach ($item['historico'] as $historico)
|
||||
<tr>
|
||||
<td>{{$historico->usuario_cadastro}}</td>
|
||||
<td>{{$historico->usuario_edicao}}</td>
|
||||
<td>{{$historico->destino}}</td>
|
||||
<td>{{$historico->veiculo ?? '-'}}</td>
|
||||
<td>{{$historico->acompanhantes}}</td>
|
||||
<td>{{$historico->data_hora_saida}}</td>
|
||||
<td>{{$historico->motivo}}</td>
|
||||
<td>{{$historico->status}}</td>
|
||||
<td>{{$historico->data_hora_modificacao}}</td>
|
||||
</td>
|
||||
@endforeach
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
|
||||
@endforeach
|
||||
</tbody>
|
||||
|
||||
<tfoot>
|
||||
<tr>
|
||||
<th colspan="{{ $colunas->count() - 1 }}">
|
||||
<b>Total</b>
|
||||
</th>
|
||||
<th>
|
||||
<strong>{{ $total }}</strong>
|
||||
</th>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
@endsection
|
||||
@@ -0,0 +1,93 @@
|
||||
@extends('impressoes.layout1.content')
|
||||
|
||||
@section('conteudo')
|
||||
<style>
|
||||
.table-relatorio > thead > tr > th,
|
||||
.table-relatorio > tfoot > tr > th { text-align: center; }
|
||||
.col-min { width: 1%; }
|
||||
.text-center { text-align: center; }
|
||||
</style>
|
||||
|
||||
<fieldset>
|
||||
<legend>Filtros</legend>
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
<strong>Período:</strong>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<strong>Município:</strong>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
{{ \Illuminate\Support\Carbon::parse($periodo['start'])->format('d/m/Y') }} à {{ \Illuminate\Support\Carbon::parse($periodo['end'])->format('d/m/Y') }}
|
||||
</div>
|
||||
<div class="col-6">
|
||||
{{ $municipio }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
<strong>Destino:</strong>
|
||||
</div>
|
||||
|
||||
<div class="col-3">
|
||||
<strong>Horário de saída:</strong>
|
||||
</div>
|
||||
|
||||
<div class="col-3">
|
||||
<strong>Paciente:</strong>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
{{ $destino }}
|
||||
</div>
|
||||
|
||||
<div class="col-3">
|
||||
{{ $horario }}
|
||||
</div>
|
||||
|
||||
<div class="col-3">
|
||||
{{ $paciente }}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</fieldset>
|
||||
|
||||
<table class="table table-relatorio">
|
||||
<thead>
|
||||
<tr>
|
||||
@foreach ($colunas as $coluna)
|
||||
<th class="{{ $coluna['class'] }}">{{ $coluna['label'] }}</th>
|
||||
@endforeach
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
@foreach ($items as $item)
|
||||
<tr>
|
||||
@foreach ($colunas as $coluna)
|
||||
<td class="{{ $coluna['class'] }}">{{ $item->{$coluna['key']} ?? '-' }}</td>
|
||||
@endforeach
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
|
||||
<tfoot>
|
||||
<tr>
|
||||
<th colspan="{{ $colunas->count() - 1 }}">
|
||||
<b>Total</b>
|
||||
</th>
|
||||
<th>
|
||||
<strong>{{ $total }}</strong>
|
||||
</th>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
@endsection
|
||||
@@ -0,0 +1,190 @@
|
||||
@extends('impressoes.layout1.content')
|
||||
|
||||
@section('conteudo')
|
||||
<style>
|
||||
.table-relatorio > thead > tr > th,
|
||||
.table-relatorio > tfoot > tr > th { text-align: center; }
|
||||
.col-min { width: 1%; }
|
||||
.text-center { text-align: center; }
|
||||
</style>
|
||||
|
||||
<fieldset>
|
||||
<legend>Filtros</legend>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-4">
|
||||
<strong>Data inicial:</strong>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<strong>Data final:</strong>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<strong>Motorista:</strong>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-4">
|
||||
{{ $data_inicial }}
|
||||
</div>
|
||||
<div class="col-4">
|
||||
{{ $data_final }}
|
||||
</div>
|
||||
<div class="col-4">
|
||||
{{ $motorista }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-4">
|
||||
<strong>Município:</strong>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<strong>Destino:</strong>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<strong>Status:</strong>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-4">
|
||||
{{ $municipio }}
|
||||
</div>
|
||||
<div class="col-4">
|
||||
{{ $destino }}
|
||||
</div>
|
||||
<div class="col-4">
|
||||
{{ $status }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-4">
|
||||
<strong>Veículo:</strong>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<strong>Motivo:</strong>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<strong>Prontuário:</strong>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-4">
|
||||
{{ $veiculo }}
|
||||
</div>
|
||||
<div class="col-4">
|
||||
{{ $motivo }}
|
||||
</div>
|
||||
<div class="col-4">
|
||||
{{ $prontuario }}
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
@foreach ($agrupados as $key => $viagens)
|
||||
@php
|
||||
list($motorista, $municipio, $status, $veiculo, $hora_saida) = explode('-', $key);
|
||||
$total_viagens = count($viagens);
|
||||
$total_diarias = $viagens->sum('diaria');
|
||||
$total_passageiros = $viagens->sum(fn($item) => $item->acompanhante + 1);
|
||||
$total_acompanhantes = $viagens->sum('acompanhante');
|
||||
|
||||
$totalColunas = count($colunas);
|
||||
$colspan1 = floor($totalColunas / 3);
|
||||
$colspan2 = floor($totalColunas / 3);
|
||||
$colspan3 = $totalColunas - ($colspan1 + $colspan2);
|
||||
|
||||
$motorista = $viagens->first()->motorista ?? 'Desconhecido';
|
||||
@endphp
|
||||
|
||||
<table class="table table-relatorio" style="margin-bottom: 30px">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
Motorista
|
||||
</th>
|
||||
<th colspan="{{ count($colunas) - 1 }}" class="text-center">
|
||||
{{ $motorista }}
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
@foreach ($colunas as $coluna)
|
||||
<th class="{{ $coluna['class'] }}">{{ $coluna['label'] }}</th>
|
||||
@endforeach
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($viagens as $item)
|
||||
<tr>
|
||||
@foreach ($colunas as $coluna)
|
||||
<td class="{{ $coluna['class'] }}">{{ $item->{$coluna['key']} ?? '-' }}</td>
|
||||
@endforeach
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="{{ $colspan1 }}"><strong>Total de viagens: {{ $total_viagens }}</strong></td>
|
||||
<td colspan="{{ $colspan2 }}"><strong>Total de passageiros: {{ $total_passageiros }}</strong></td>
|
||||
<td colspan="{{ $colspan3 }}"><strong>Total de diárias: R${{ number_format($total_diarias, 2, ',', '.') }}</strong></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
|
||||
@endforeach
|
||||
|
||||
<fieldset style="margin-top: 20px;">
|
||||
<legend>Total Geral</legend>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-4">
|
||||
<strong>Total de viagens no período:</strong>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<strong>Total pago de diária no período:</strong>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<strong>Total de pacientes no período:</strong>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-4">
|
||||
{{ $total['viagens'] }}
|
||||
</div>
|
||||
<div class="col-4">
|
||||
R${{ $total['diarias'] }}
|
||||
</div>
|
||||
<div class="col-4">
|
||||
{{ $total['pacientes'] }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-4">
|
||||
<strong>Total de acompanhantes no período:</strong>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<strong>Total de passageiros no período:</strong>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<strong>% total de acompanhantes:</strong>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-4">
|
||||
{{ $total['acompanhantes'] }}
|
||||
</div>
|
||||
<div class="col-4">
|
||||
{{ $total['passageiros'] }}
|
||||
</div>
|
||||
<div class="col-4">
|
||||
{{ $total['porcentagem'] }}%
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
@endsection
|
||||
@@ -0,0 +1,135 @@
|
||||
@extends('impressoes.layout1.content')
|
||||
|
||||
@section('conteudo')
|
||||
<style>
|
||||
.table-relatorio > thead > tr > th,
|
||||
.table-relatorio > tfoot > tr > th { text-align: center; }
|
||||
.col-min { width: 1%; }
|
||||
.text-center { text-align: center; }
|
||||
body {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
font-size: 14px;
|
||||
}
|
||||
strong{
|
||||
font-size: 14px;
|
||||
}
|
||||
fieldset{
|
||||
display: block;
|
||||
margin-inline-start: 2px;
|
||||
margin-inline-end: 2px;
|
||||
padding-block-start: 0.35em;
|
||||
padding-inline-start: 0.75em;
|
||||
padding-inline-end: 0.75em;
|
||||
padding-block-end: 0.625em;
|
||||
min-inline-size: min-content;
|
||||
border-width: 2px;
|
||||
border-style: groove;
|
||||
border-color: rgb(192, 192, 192);
|
||||
border-image: initial;
|
||||
}
|
||||
legend {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
font-size: 16px;
|
||||
font-weight: 100!important;
|
||||
}
|
||||
</style>
|
||||
|
||||
<fieldset>
|
||||
<legend>Filtros</legend>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
<strong>Período de:</strong> {{ $data_inicial }}
|
||||
<strong>Até: </strong> {{ $data_final }}
|
||||
</div>
|
||||
<div class="col-6">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-4">
|
||||
<strong>Veículo:</strong> {{ $veiculo }}
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<strong>Motorista:</strong> {{ $motorista }}
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<strong>Destino:</strong> {{ $destino }}
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<table class="table table-relatorio">
|
||||
<thead>
|
||||
<tr>
|
||||
@foreach ($colunas as $coluna)
|
||||
<th class="{{ $coluna['class'] }}">{{ $coluna['label'] }}</th>
|
||||
@endforeach
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
@foreach ($items as $item)
|
||||
<tr>
|
||||
@foreach ($colunas as $coluna)
|
||||
<td class="{{ $coluna['class'] }}">
|
||||
@if ($coluna['isCurrency'] == 'true')
|
||||
{{ 'R$ ' . number_format(floatval($item->{$coluna['key']}), 2, ',', '.') }}
|
||||
@else
|
||||
{{ $item->{$coluna['key']} ?? '-' }}
|
||||
@endif
|
||||
</td>
|
||||
@endforeach
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
|
||||
<tfoot>
|
||||
|
||||
<tr>
|
||||
<th colspan="{{ $colunas->count() / 3}}">
|
||||
<b>Total diária(s):</b>
|
||||
<strong>{{ 'R$ ' . number_format(floatval($total_diaria), 2, ',', '.') }}</strong>
|
||||
</th>
|
||||
<th colspan="{{ $colunas->count() / 3}}">
|
||||
<b>Total refeição(s):</b>
|
||||
<strong>{{ 'R$ ' . number_format(floatval($total_refeicao), 2, ',', '.') }}</strong>
|
||||
</th>
|
||||
<th colspan="{{ $colunas->count() % 3 == 0 ? $colunas->count() / 3 : $colunas->count() + 1}}">
|
||||
<b>Total pernoite(s):</b>
|
||||
<strong>{{ 'R$ ' . number_format(floatval($total_pernoite), 2, ',', '.') }}</strong>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="{{ $colunas->count() / 3}}">
|
||||
<b>Total pedágio(s):</b>
|
||||
<strong>{{ 'R$ ' . number_format(floatval($total_pedagio), 2, ',', '.') }}</strong>
|
||||
</th>
|
||||
<th colspan="{{ $colunas->count() / 3}}">
|
||||
<b>Total combustível(s):</b>
|
||||
<strong>{{ 'R$ ' . number_format(floatval($total_combustivel), 2, ',', '.') }}</strong>
|
||||
</th>
|
||||
<th colspan="{{ $colunas->count() % 3 == 0 ? $colunas->count() / 3 : $colunas->count() + 1}}">
|
||||
<b>Total outra(s) despesa(s):</b>
|
||||
<strong>{{ 'R$ ' . number_format(floatval($total_outras_despesas), 2, ',', '.') }}</strong>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="{{ $colunas->count() - 2}}">
|
||||
<b>Total KM percorrido</b>
|
||||
</th>
|
||||
<th colspan="2">
|
||||
<strong>{{ $total_km_percorrido }}</strong>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="{{ $colunas->count() - 2}}">
|
||||
<b>Total despesa(s)</b>
|
||||
</th>
|
||||
<th colspan="2">
|
||||
<strong>{{ 'R$ ' . number_format(floatval($total_despesa), 2, ',', '.') }}</strong>
|
||||
</th>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
@endsection
|
||||
@@ -0,0 +1,130 @@
|
||||
@extends('impressoes.layout1.content')
|
||||
|
||||
@section('conteudo')
|
||||
<style>
|
||||
.table-relatorio > thead > tr > th,
|
||||
.table-relatorio > tfoot > tr > th { text-align: center; }
|
||||
.col-min { width: 1%; }
|
||||
.text-center { text-align: center; }
|
||||
body {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
font-size: 14px;
|
||||
}
|
||||
strong{
|
||||
font-size: 14px;
|
||||
}
|
||||
fieldset{
|
||||
display: block;
|
||||
margin-inline-start: 2px;
|
||||
margin-inline-end: 2px;
|
||||
padding-block-start: 0.35em;
|
||||
padding-inline-start: 0.75em;
|
||||
padding-inline-end: 0.75em;
|
||||
padding-block-end: 0.625em;
|
||||
min-inline-size: min-content;
|
||||
border-width: 2px;
|
||||
border-style: groove;
|
||||
border-color: rgb(192, 192, 192);
|
||||
border-image: initial;
|
||||
}
|
||||
legend {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
font-size: 16px;
|
||||
font-weight: 100!important;
|
||||
}
|
||||
</style>
|
||||
|
||||
<fieldset>
|
||||
<legend>Filtros</legend>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-4">
|
||||
<strong>Período:</strong>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<strong>Veículo:</strong>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<strong>Cidade de Destino:</strong>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="cell col-4">
|
||||
De {{ $inicio }} até {{ $fim }}
|
||||
</div>
|
||||
<div class="col-4">
|
||||
{{ $veiculo }}
|
||||
</div>
|
||||
<div class="col-4">
|
||||
{{ $municipio }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" style="margin-top:5px;" >
|
||||
<div class="col-4">
|
||||
<strong>Local de Destino:</strong>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<strong>Motivo:</strong>
|
||||
</div>
|
||||
<div class="col-4"></div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-4">
|
||||
{{ $destino }}
|
||||
</div>
|
||||
<div class="col-4">
|
||||
{{ $motivo }}
|
||||
</div>
|
||||
<div class="col-4"></div>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<table class="table table-relatorio">
|
||||
<thead>
|
||||
<tr>
|
||||
@foreach ($colunas as $coluna)
|
||||
<th class="{{ $coluna['class'] }}">{{ $coluna['label'] }}</th>
|
||||
@endforeach
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
@foreach ($items as $item)
|
||||
<tr>
|
||||
@foreach ($colunas as $coluna)
|
||||
<td class="{{ $coluna['class'] }}">{{ $item->{$coluna['key']} ?? '-' }}</td>
|
||||
@endforeach
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<table class="table table-relatorio" style="margin-top: 20px;">
|
||||
<tr>
|
||||
<td colspan="{{ $colunas->count() - 1 }}">
|
||||
<b>Total geral de paciente(s):</b>
|
||||
</td>
|
||||
<td>
|
||||
<strong>{{ $total_paciente }}</strong>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="{{ $colunas->count() - 1 }}">
|
||||
<b>Total geral de acompanhante(s):</b>
|
||||
</td>
|
||||
<td>
|
||||
<strong>{{ $total_acompanhantes }}</strong>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="{{ $colunas->count() - 1 }}">
|
||||
<b>Total geral de paciente(s) e acompanhante(s)</b>
|
||||
</td>
|
||||
<td>
|
||||
<strong>{{ $total_paciente_acompanhante }}</strong>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@endsection
|
||||
@@ -0,0 +1,126 @@
|
||||
@extends('impressoes.layout1.content')
|
||||
|
||||
@section('conteudo')
|
||||
<style>
|
||||
.table-relatorio{ margin-bottom:20px; }
|
||||
.table-relatorio > thead > tr > th,
|
||||
.table-relatorio > tfoot > tr > th { text-align: center; }
|
||||
.col-min { width: 1%; }
|
||||
.text-center { text-align: center; }
|
||||
</style>
|
||||
|
||||
<fieldset>
|
||||
<legend>Filtros</legend>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
<strong>Data inicial:</strong>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<strong>Data final:</strong>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
{{ $data_inicial }}
|
||||
</div>
|
||||
<div class="col-6">
|
||||
{{ $data_final }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
<strong>Motorista:</strong>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<strong>Status:</strong>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
{{ $filtro_motorista }}
|
||||
</div>
|
||||
<div class="col-6">
|
||||
{{ $filtro_status }}
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
@foreach ($motorista as $motorista)
|
||||
<table class="table table-relatorio">
|
||||
<tr>
|
||||
<th colspan="{{ $colunas->count() }}" style="white-space: nowrap; text-align: center">
|
||||
Motorista: {{ $motorista['nome'] }}
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
@foreach ($colunas as $coluna)
|
||||
<th class="{{ $coluna['class'] }}">{{ $coluna['label'] }}</th>
|
||||
@endforeach
|
||||
</tr>
|
||||
|
||||
@foreach ($consulta as $val)
|
||||
@if ($val['motorista_id'] == $motorista['id'])
|
||||
<tr>
|
||||
@foreach ($colunas as $coluna)
|
||||
<td class="{{ $coluna['class'] }}">{{ $val[$coluna['key']] ?? '0' }}</td>
|
||||
@endforeach
|
||||
</tr>
|
||||
@endif
|
||||
@endforeach
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<strong>Totais:</strong>
|
||||
</td>
|
||||
@php $total_geral = 0; @endphp
|
||||
@foreach ($meses as $mes)
|
||||
@php $total_mes = 0; @endphp
|
||||
@foreach ($consulta as $val)
|
||||
@if ($val['motorista_id'] == $motorista['id'])
|
||||
@foreach ($colunas as $coluna)
|
||||
@if($coluna['label'] == $mes['mes_abreviado'] && $val[$coluna['key']])
|
||||
@php $total_mes = $total_mes + $val[$coluna['key']] @endphp
|
||||
@endif
|
||||
@endforeach
|
||||
@endif
|
||||
@endforeach
|
||||
<td style="text-align: center">{{ $total_mes }}</td>
|
||||
@php $total_geral = $total_geral + $total_mes @endphp
|
||||
@endforeach
|
||||
<td style="text-align: center">{{ $total_geral }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
@endforeach
|
||||
|
||||
@if ($filtro_motorista == 'Todos')
|
||||
<fieldset>
|
||||
<legend>Totais</legend>
|
||||
|
||||
<div class="row">
|
||||
@foreach ($meses as $mes)
|
||||
<div class="col-1">
|
||||
<strong>{{ $mes['mes'] }}</strong>
|
||||
</div>
|
||||
@endforeach
|
||||
<div class="col-1">
|
||||
<strong>Total</strong>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
@foreach ($meses as $mes)
|
||||
<div class="col-1">
|
||||
{{ $mes['total'] }}
|
||||
</div>
|
||||
@endforeach
|
||||
<div class="col-1">
|
||||
{{ $total }}
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
@endif
|
||||
|
||||
@endsection
|
||||
@@ -0,0 +1,123 @@
|
||||
@extends('impressoes.layout1.content')
|
||||
|
||||
@section('conteudo')
|
||||
<style>
|
||||
.table-relatorio>thead>tr>th,
|
||||
.table-relatorio>tfoot>tr>th {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.col-min {
|
||||
width: 1%;
|
||||
}
|
||||
|
||||
.text-center {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
fieldset, .linha-filtro {
|
||||
margin: 10px 0;
|
||||
}
|
||||
|
||||
.col-auto {
|
||||
display: table-cell;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.col-date {
|
||||
width: 50px;
|
||||
}
|
||||
|
||||
</style>
|
||||
<fieldset>
|
||||
<legend>Filtros</legend>
|
||||
|
||||
<div class="linha-filtro">
|
||||
<div class="row">
|
||||
<div class="col-4">
|
||||
<strong>Período:</strong>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<strong>Município:</strong>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<strong>Motorista:</strong>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-4">
|
||||
De {{ $data_inicial }} até {{ $data_final }}
|
||||
</div>
|
||||
<div class="col-4">
|
||||
{{ $municipio }}
|
||||
</div>
|
||||
<div class="col-4">
|
||||
{{ $motorista }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="linha-filtro">
|
||||
<div class="row">
|
||||
<div class="col-4">
|
||||
<strong>Destino:</strong>
|
||||
</div>
|
||||
<div class="col-8">
|
||||
<strong>Status:</strong>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-4">
|
||||
{{ $destino }}
|
||||
</div>
|
||||
<div class="col-8">
|
||||
{{ $status }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<table class="table table-relatorio">
|
||||
<thead>
|
||||
<tr>
|
||||
@foreach ($colunas as $coluna)
|
||||
<th class="{{ $coluna['class'] }}">{{ $coluna['label'] }} </th>
|
||||
@endforeach
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
@foreach ($items['consulta'] as $item)
|
||||
<tr>
|
||||
@foreach ($colunas as $coluna)
|
||||
<td class="{{ $coluna['class'] }}">{{ $item->{$coluna['key']} ?? '-' }}</td>
|
||||
@endforeach
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<fieldset>
|
||||
<legend>Totais</legend>
|
||||
|
||||
<div class="linha-filtro">
|
||||
<div class="row">
|
||||
<div class="col-auto">
|
||||
<strong>Agendado(s):</strong> {{ $totalizadores['agendado'] }}
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<strong>Cancelado(s):</strong> {{ $totalizadores['cancelado'] }}
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<strong>Falta(s):</strong> {{ $totalizadores['faltou'] }}
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<strong>Transportado(s):</strong> {{ $totalizadores['transportado'] }}
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<strong>Todos:</strong> {{ $totalizadores['geral'] }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
@endsection
|
||||
@@ -0,0 +1,108 @@
|
||||
@extends('impressoes.layout1.content')
|
||||
|
||||
@section('conteudo')
|
||||
<style>
|
||||
.table-relatorio > thead > tr > th,
|
||||
.table-relatorio > tfoot > tr > th { text-align: center; }
|
||||
.col-min { width: 1%; }
|
||||
.text-center { text-align: center; }
|
||||
</style>
|
||||
|
||||
<fieldset>
|
||||
<legend>Filtros</legend>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-3">
|
||||
<strong>Data inicial:</strong>
|
||||
</div>
|
||||
<div class="col-3">
|
||||
<strong>Data final:</strong>
|
||||
</div>
|
||||
<div class="col-3">
|
||||
<strong>Motivo da viagem:</strong>
|
||||
</div>
|
||||
<div class="col-3">
|
||||
<strong>Cidade de destino:</strong>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-3">
|
||||
{{ $data_inicial }}
|
||||
</div>
|
||||
<div class="col-3">
|
||||
{{ $data_final }}
|
||||
</div>
|
||||
<div class="col-3">
|
||||
{{ $motivo_viagem }}
|
||||
</div>
|
||||
<div class="col-3">
|
||||
{{ $municipio }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-3">
|
||||
<strong>Local de destino:</strong>
|
||||
</div>
|
||||
<div class="col-3">
|
||||
<strong>Veículo:</strong>
|
||||
</div>
|
||||
<div class="col-3">
|
||||
<strong>Status:</strong>
|
||||
</div>
|
||||
<div class="col-3"></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-3">
|
||||
{{ $destino }}
|
||||
</div>
|
||||
<div class="col-3">
|
||||
{{ $veiculo }}
|
||||
</div>
|
||||
<div class="col-3">
|
||||
{{ $status }}
|
||||
</div>
|
||||
<div class="col-3"></div>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<table class="table table-relatorio">
|
||||
<thead>
|
||||
<tr>
|
||||
@foreach ($colunas as $coluna)
|
||||
<th class="{{ $coluna['class'] }}">{{ $coluna['label'] }}</th>
|
||||
@endforeach
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
@foreach ($items as $item)
|
||||
<tr>
|
||||
@foreach ($colunas as $coluna)
|
||||
<td class="{{ $coluna['class'] }}">{{ $item->{$coluna['key']} ?? '-' }}</td>
|
||||
@endforeach
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<fieldset style="margin-top: 16px;">
|
||||
<legend>Totais</legend>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-4">
|
||||
<strong>Paciente: </strong> {{ $total_paciente }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-4">
|
||||
<strong>Acompanhante: </strong> {{ $total_acompanhante }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-4">
|
||||
<strong>Paciente + Acompanhante: </strong> {{ $total_paciente_acompanhante }}
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
@endsection
|
||||
@@ -0,0 +1,108 @@
|
||||
@extends('impressoes.layout1.content')
|
||||
|
||||
@section('conteudo')
|
||||
<style>
|
||||
table { margin-bottom: 15px; }
|
||||
.table-relatorio > thead > tr > th,
|
||||
.table-relatorio > tfoot > tr > th { text-align: center; }
|
||||
.col-min { width: 1%; }
|
||||
.text-center { text-align: center; }
|
||||
</style>
|
||||
|
||||
<fieldset>
|
||||
<legend>Filtros</legend>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
<strong>Data inicial:</strong>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<strong>Data final:</strong>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
{{ $data_inicial }}
|
||||
</div>
|
||||
<div class="col-6">
|
||||
{{ $data_final }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
<strong>Veículo:</strong>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<strong>Status:</strong>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
{{ $filtro_veiculo }}
|
||||
</div>
|
||||
<div class="col-6">
|
||||
{{ $filtro_status }}
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<table class="table table-relatorio">
|
||||
<thead>
|
||||
<tr>
|
||||
@foreach ($colunas as $coluna)
|
||||
<th class="{{ $coluna['class'] }}">{{ $coluna['label'] }}</th>
|
||||
@endforeach
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
@foreach ($items as $item)
|
||||
<tr>
|
||||
@foreach ($colunas as $coluna)
|
||||
<td class="{{ $coluna['class'] }}">{{ $item[$coluna['key']] ?? '0' }}</td>
|
||||
@endforeach
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<table class="table table-relatorio ">
|
||||
<thead>
|
||||
<tr>
|
||||
@foreach ($colunas as $coluna)
|
||||
<th class="{{ $coluna['class'] }}">{{ $coluna['label'] }}</th>
|
||||
@endforeach
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
@foreach ($veiculos as $veiculo)
|
||||
<tr>
|
||||
@foreach ($colunas as $coluna)
|
||||
<td class="{{ $coluna['class'] }}">{{ $veiculo[$coluna['key']] ?? '0' }}</td>
|
||||
@endforeach
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<table class="table table-relatorio ">
|
||||
<thead>
|
||||
<tr>
|
||||
@foreach ($colunasTotal as $coluna)
|
||||
<th class="{{ $coluna['class'] }}">{{ $coluna['label'] }}</th>
|
||||
@endforeach
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<tr>
|
||||
@foreach ($colunasTotal as $coluna)
|
||||
<td>{{ $totais[$coluna['key']] ?? '0' }}</td>
|
||||
@endforeach
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@endsection
|
||||
@@ -0,0 +1,76 @@
|
||||
@extends('impressoes.layout1.content')
|
||||
|
||||
@section('conteudo')
|
||||
<style>
|
||||
.table-relatorio > thead > tr > th,
|
||||
.table-relatorio > tfoot > tr > th { text-align: center; }
|
||||
.col-min { width: 1%; }
|
||||
.text-center { text-align: center; }
|
||||
</style>
|
||||
|
||||
<fieldset>
|
||||
<legend>Filtros</legend>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
<strong>Data inicial:</strong>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<strong>Data final:</strong>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
{{ $data_inicial }}
|
||||
</div>
|
||||
<div class="col-6">
|
||||
{{ $data_final }}
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<table class="table table-relatorio">
|
||||
<thead>
|
||||
<tr>
|
||||
@foreach ($colunas as $coluna)
|
||||
<th class="{{ $coluna['class'] }}">{{ $coluna['label'] }}</th>
|
||||
@endforeach
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
@foreach ($items as $item)
|
||||
<tr>
|
||||
@foreach ($colunas as $coluna)
|
||||
<td class="{{ $coluna['class'] }}">{{ $item->{$coluna['key']} ?? '-' }}</td>
|
||||
@endforeach
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
|
||||
<tfoot>
|
||||
<tr>
|
||||
<th colspan="{{ $colunas->count() }}">
|
||||
<strong>Quantidade = paciente + acompanhantes</strong>
|
||||
</th>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
|
||||
<fieldset style="margin-top: 16px;">
|
||||
<legend>Total</legend>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
<strong>Quantidade</strong>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
{{ $total_pacientes_acompanhantes }}
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
@endsection
|
||||
Reference in New Issue
Block a user