This commit is contained in:
@@ -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