2025-08-12 17:24:34 +07:00

162 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 Pending</title>
<style>
body {
font-family: Arial, sans-serif;
font-size: 10px;
line-height: 1.5;
margin: 20px;
color: #333;
}
.header {
margin-bottom: 10px;
padding-bottom: 10px;
}
.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: 10px;
}
td {
font-size: 10px;
vertical-align: top;
}
tr:nth-child(even) td {
background-color: #f9f9f9;
}
.footer {
position: absolute;
bottom: 30px;
width: 100%;
text-align: center;
font-size: 10px;
color: #999;
}
</style>
</head>
<body>
<div class="header">
<div style=" align-items: center;">
<div>
<img src="{{ public_path('logo/logo_rsabhk.png') }}" alt="Logo RSAB" style="height: 45px;">
</div>
<div style="margin-left: 37px; margin-top: -45px; text-align: center;">
<h2>{{ $laporan ?? 'Laporan Konfirmasi Pesanan' }} </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>
</div>
<div class="meta">
Dicetak pada: {{ $waktu_cetak }}
</div>
<table>
<thead>
<tr>
<th style="width:5%;">No</th>
<th>No Order</th>
<th>Status Bayar</th>
<th>Nama Pemesan</th>
<th>Menu</th>
<th>Status Order</th>
<th style="width:9%;">Jumlah</th>
<th style="width:9%; text-align:center;">Harga Satuan (Rp)</th>
<th>Tanggal Antar</th>
<th>Waktu Makan</th>
</tr>
</thead>
<tbody>
@php $no = 1; @endphp
@forelse ($orders as $order)
@foreach ($order->orderDetail as $i => $detail)
<tr>
<td>{{ $i === 0 ? $no++ : '' }}</td>
<td>{{ $i === 0 ? $order->no_order : '' }}</td>
<td>{{ $i === 0 ? (($order->status_order === "Belum Bayar" || $order->status_order === "Dibatalkan" ) ? $order->status_order : $order->status_order . ' ('. $order->cara_pembayaran .')' ) : '' }}</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>