Files
Antonio Lopes dos Santos afec302c3e
All checks were successful
build-api-image / build (push) Successful in 51s
init commit
2026-08-04 16:52:02 -03:00

121 lines
2.6 KiB
PHP

<table>
<tr>
<td style="text-align: center" colspan="{{ $colunas->count() }}">
<strong>{{ $title }}</strong>
</td>
</tr>
<tr>
<td>
<strong>Período:</strong>
</td>
<td>
<strong>Exame:</strong>
</td>
</tr>
<tr>
<td>
De {{ $periodo['start'] }} até {{ $periodo['end'] }}
</td>
<td>
{{ $exame_nome }}
</td>
</tr>
<tr>
<td>
<strong>Unidade de coleta:</strong>
</td>
<td>
<strong>Local de atendimento:</strong>
</td>
</tr>
<tr>
<td>
{{ $coleta_unidade_nome }}
</td>
<td>
{{ $coleta_infraestrutura_nome }}
</td>
</tr>
<tr>
<td>
<strong>Laboratório:</strong>
</td>
<td>
<strong>Local de atendimento:</strong>
</td>
</tr>
<tr>
<td>
{{ $laboratorio_nome_fantasia }}
</td>
<td>
{{ $laboratorio_infraestrutura_nome }}
</td>
</tr>
</table>
<table>
<thead>
<tr>
@foreach ($colunas as $coluna)
<th>
<strong>{{ $coluna['label'] }}</strong>
</th>
@endforeach
</tr>
</thead>
<tbody>
@php
$quantidade = 0;
$quantidadeReagentes = 0;
@endphp
@foreach ($agendamentos as $agendamento)
@php
$quantidade = $quantidade + $agendamento['quantidade'];
$quantidadeReagentes = $quantidadeReagentes + $agendamento['quantidade_reagente'];
@endphp
<tr>
@foreach ($colunas as $coluna)
<td class="{{ $coluna['class'] }} background-white">{{ $agendamento[$coluna['key']] ?? '-' }}</td>
@endforeach
</tr>
@if ($loop->last)
<tr>
<th colspan="{{ $colunas->count() - 2 }}">
<strong>
Total
</strong>
</th>
<th>
<strong>
{{ $quantidade }}
</strong>
</th>
<th>
<strong>
{{ $quantidadeReagentes }}
</strong>
</th>
</tr>
@endif
@endforeach
</tbody>
</table>