2025-08-05 16:00:45 +07:00

163 lines
4.9 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html lang="id">
<head>
<meta charset="UTF-8">
<title>Laporan Pesanan</title>
<style>
body {
font-family: Arial, sans-serif;
font-size: 11px;
line-height: 1.5;
margin: 40px;
color: #333;
}
.header {
text-align: center;
margin-bottom: 10px;
padding-bottom: 10px;
border-bottom: 1px solid #ccc;
}
.header h2 {
margin: 0;
font-size: 20px;
text-transform: uppercase;
}
.header .sub-title {
margin: 4px 0 0;
font-size: 13px;
color: #666;
}
.meta {
text-align: right;
margin-bottom: 15px;
font-size: 12px;
font-weight: bold;
color: #444;
}
table {
width: 100%;
border-collapse: collapse;
margin-top: 5px;
table-layout: fixed;
}
th, td {
border: 1px solid #ccc;
padding: 6px 8px;
word-wrap: break-word;
word-break: break-word;
}
th {
background-color: #f0f0f0;
text-align: center;
font-size: 11px;
}
td {
font-size: 11px;
vertical-align: top;
}
tr:nth-child(even) td {
background-color: #f9f9f9;
}
th:nth-child(1), td:nth-child(1) { width: 30px; text-align: center; }
th:nth-child(2), td:nth-child(2) { width: 90px; }
th:nth-child(3), td:nth-child(3) { width: 140px; }
th:nth-child(4), td:nth-child(4) { width: 150px; }
th:nth-child(5), td:nth-child(5) { width: 50px; text-align: center; }
th:nth-child(6), td:nth-child(6) { width: 80px; text-align: right; }
th:nth-child(7), td:nth-child(7) { width: 90px; text-align: center; }
th:nth-child(8), td:nth-child(8) { width: 60px; text-align: center; }
.footer {
position: absolute;
bottom: 30px;
width: 100%;
text-align: center;
font-size: 10px;
color: #999;
}
</style>
</head>
<body>
<div class="header">
<h2>Laporan Pesanan Pending</h2>
@if($startDate === $endDate)
<div class="sub-title">Periode: {{ $startDate }} </div>
@else
<div class="sub-title">Periode: {{ $startDate }} - {{ $endDate }}</div>
@endif
<div class="sub-title">RSAB Harapan Kita</div>
</div>
<div class="meta">
Dicetak pada: {{ $waktu_cetak }}
</div>
<table>
<thead>
<tr>
<th>No</th>
<th>No Order</th>
<th>Nama Pemesan</th>
<th>Menu</th>
<th>Status Order</th>
<th>Jumlah</th>
<th>Harga Satuan (Rp)</th>
<th>Tanggal Antar</th>
<th>Waktu</th>
</tr>
</thead>
<tbody>
@php $no = 1; @endphp
@forelse ($orders as $order)
@foreach ($order->orderDetail as $i => $detail)
<tr>
<td style="text-align: center;">{{ $i === 0 ? $no++ : '' }}</td>
<td>{{ $i === 0 ? $order->no_order : '' }}</td>
<td>
@if ($i === 0)
{{ $order->nama_pemesan }}
@if ($order->jenis_customer)
<br><small>({{ $order->jenis_customer }})</small>
@endif
@endif
</td>
<td>{{ $detail->menu->nama_menu ?? '-' }}</td>
<td>{{ $detail->status_order ?? '-' }}</td>
<td style="text-align: center;">{{ $detail->jumlah }}</td>
<td style="text-align: right;">{{ number_format($detail->harga_satuan, 0, ',', '.') }}</td>
<td style="text-align: center;">
{{ $detail->tgl_antar
? \Carbon\Carbon::parse($detail->tgl_antar)->locale('id')->translatedFormat('d F Y')
: '-' }}
</td>
<td style="text-align: center;">{{ $detail->type }}</td>
</tr>
@endforeach
@empty
<tr>
<td colspan="9" style="text-align: center; color: #888;">Tidak ada data pesanan</td>
</tr>
@endforelse
</tbody>
</table>
<div class="footer">
&copy; {{ date('Y') }} RSAB Harapan Kita Sistem Order Gizi
</div>
</body>
</html>