65 lines
3.9 KiB
PHP
65 lines
3.9 KiB
PHP
<!DOCTYPE html>
|
|
<html lang="pt">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<title>RA-{{ $record->id }} · Entrega #{{ $delivery->id }} · SGC</title>
|
|
<style>
|
|
@page { size: A4; margin: 17mm; }
|
|
* { box-sizing: border-box; }
|
|
body { color: #111; font: 12px/1.5 Arial, sans-serif; max-width: 950px; margin: 24px auto; }
|
|
h1 { font-size: 24px; } h2 { font-size: 16px; }
|
|
table { width: 100%; border-collapse: collapse; margin: 18px 0; }
|
|
th, td { border: 1px solid #ccc; padding: 8px; text-align: left; vertical-align: top; overflow-wrap: anywhere; }
|
|
thead { display: table-header-group; } tr { break-inside: avoid; }
|
|
.pre { white-space: pre-wrap; overflow-wrap: anywhere; } .notice { border: 1px solid #aaa; padding: 12px; }
|
|
button { padding: 10px; } @media print { .no-print { display: none; } body { margin: 0; max-width: none; } }
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<button type="button" class="no-print" onclick="window.print()">Imprimir ou guardar como PDF</button>
|
|
<h1>Documento de saída interna</h1>
|
|
<p><strong>Requisição RA-{{ $record->id }} · Entrega #{{ $delivery->id }}</strong> · Sem factura</p>
|
|
<p class="notice">Esta reprodução identifica exclusivamente a entrega registada abaixo. Quantidades pedidas, reservadas ou entregues noutros momentos não integram esta saída. Não constitui factura nem assinatura digital.</p>
|
|
<h2>Utilização e responsáveis</h2>
|
|
<p>Armazém: {{ $record->snapshot['warehouse']['code'] }} · {{ $record->snapshot['warehouse']['name'] }}<br>
|
|
Requisitante: {{ $record->snapshot['requester']['name'] }}<br>
|
|
Centro de custo: {{ $record->snapshot['cost_center']['code'] }} · {{ $record->snapshot['cost_center']['name'] }}<br>
|
|
Destino: {{ $record->snapshot['destination'] }}<br>
|
|
Entregue por: {{ $delivery->data['actor']['name'] ?? 'Utilizador #'.$delivery->actor_id }} · {{ $delivery->created_at }}</p>
|
|
<p class="pre">Finalidade: {{ $record->snapshot['reason'] }}</p>
|
|
@if($authorization)
|
|
<p>Autorização por {{ $authorization->data['actor']['name'] ?? 'Utilizador #'.$authorization->actor_id }} · {{ $authorization->created_at }} · Registo #{{ $authorization->id }}</p>
|
|
@endif
|
|
<table>
|
|
<thead><tr><th>Artigo</th><th>Quantidade desta entrega</th><th>Utilização / equipamento</th><th>Movimento de origem</th></tr></thead>
|
|
<tbody>
|
|
@foreach($delivery->data['lines'] as $line)
|
|
@php($source = $record->snapshot['lines'][$line['index']])
|
|
<tr>
|
|
<td>{{ $source['item']['code'] }} · {{ $source['item']['name'] }}</td>
|
|
<td>{{ number_format($line['quantity_milli'] / 1000, 3, ',', '.') }} {{ $source['item']['unit'] }}</td>
|
|
<td>{{ $source['destination'] }}
|
|
@if($source['equipment'] ?? null)
|
|
<br>{{ $source['equipment']['code'] }} · {{ $source['equipment']['description'] }}
|
|
@else
|
|
<br>Uso interno
|
|
@endif
|
|
</td>
|
|
<td>Operação #{{ $line['stock_operation_id'] }}</td>
|
|
</tr>
|
|
@endforeach
|
|
</tbody>
|
|
</table>
|
|
<p class="pre">Motivo da entrega: {{ $delivery->reason }}</p>
|
|
<h2>Confirmação de recepção</h2>
|
|
@if($confirmation)
|
|
<p>Recepção confirmada por {{ $confirmation->data['actor']['name'] ?? 'Utilizador #'.$confirmation->actor_id }} · {{ $confirmation->created_at }} · Registo #{{ $confirmation->id }}</p>
|
|
<p class="pre">{{ $confirmation->reason }}</p>
|
|
@else
|
|
<p>Recepção por confirmar à data desta consulta.</p>
|
|
@endif
|
|
<p>A entrega é preservada como registo original. Devoluções ou correcções posteriores devem ser consultadas nos respectivos processos; esta reprodução não calcula o saldo actual.</p>
|
|
</body>
|
|
</html>
|