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

134 lines
3.4 KiB
PHP

@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; }
.text-danger { color: #dc3545; }
.text-success { color: #28a745; }
.text-warning { color: #ffc107; }
</style>
<fieldset>
<legend>Filtros</legend>
<div class="row">
<div class="col-6">
<strong>Unidade:</strong>
</div>
<div class="col-6">
<strong>Local de atendimento:</strong>
</div>
</div>
<div class="row">
<div class="col-6">
{{ $unidade_nome_fantasia }}
</div>
<div class="col-6">
{{ $infraestrutura_nome }}
</div>
</div>
<div class="row">
<div class="col-6">
<strong>Setor:</strong>
</div>
<div class="col-6">
<strong>Grupo:</strong>
</div>
</div>
<div class="row">
<div class="col-6">
{{ $setor_nome }}
</div>
<div class="col-6">
{{ $grupo_nome }}
</div>
</div>
<div class="row">
<div class="col-6">
<strong>Subgrupo:</strong>
</div>
<div>
<strong>Material:</strong>
</div>
</div>
<div class="row">
<div class="col-6">
{{ $subgrupo_nome }}
</div>
<div class="col-6">
{{ $material_descricao }}
</div>
</div>
<div class="row">
<div class="col-6">
<strong>Status:</strong>
</div>
</div>
<div class="row">
<div class="col-6">
{{ $status }}
</div>
</div>
</fieldset>
<table class="table table-relatorio">
<thead>
<tr>
<th colspan="{{ sizeof($colunas) - 4 }}"></th>
<th colspan="4">
Estoque
</th>
</tr>
<tr>
@foreach ($colunas as $coluna)
<th class="{{ $coluna['class'] }}">{{ $coluna['label'] }}</th>
@endforeach
</tr>
</thead>
<tbody>
@foreach ($itens as $item)
<tr>
@foreach ($colunas as $coluna)
@if (in_array($coluna['key'], ['lote', 'validade_lote', 'quantidade']))
<td class="{{ $coluna['class'] }}">
@foreach ($item->lotes as $lote)
<div>{{ $lote->{$coluna['key']} }}</div>
@endforeach
</td>
@elseif ($coluna['key'] == 'status')
<td class="
{{ $coluna['class'] }}
{{ $item->status['value'] == 'abaixo_minimo' ? 'text-danger' : '' }}
{{ $item->status['value'] == 'normal' ? 'text-success' : '' }}
{{ $item->status['value'] == 'acima_maximo' ? 'text-warning' : '' }}
">
{{ $item->status['text'] ?? '-' }}
</td>
@else
<td class="{{ $coluna['class'] }}">{{ $item->{$coluna['key']} ?? '-' }}</td>
@endif
@endforeach
</tr>
@endforeach
</tbody>
</table>
@endsection