194 lines
6.3 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>Daftar Pesanan</title>
<style>
body {
font-family: Arial, sans-serif;
font-size: 10.5px;
line-height: 1.5;
margin: 25px;
color: #333;
}
.header {
margin-bottom: 10px;
padding-bottom: 10px;
}
.header .sub-title {
margin: 4px 0 0;
font-size: 13px;
color: #666;
}
.header h2 {
margin: 0;
font-size: 20px;
text-transform: uppercase;
}
.header p {
margin: 2px 0 0;
font-size: 12px;
color: #666;
}
.meta {
text-align: right;
margin-bottom: 10px;
font-size: 12px;
font-weight: bold;
color: #444;
}
table {
width: 100%;
border-collapse: collapse;
margin-top: 8px;
}
th, td {
border: 1px solid #bbb;
padding: 3px 5px;
}
th {
background-color: #d4d4d465;
text-align: center;
}
td {
vertical-align: top;
font-size: 11px;
}
th:nth-child(7), td:nth-child(7) {
width: 10%; /* buat lebih panjang dari kolom lain */
}
th:nth-child(4), td:nth-child(4) {
width: 10px;
text-align: center;
}
th:nth-child(6), td:nth-child(6) {
width: 110px;
text-align: center;
}
.keterangan {
font-size: 10px;
line-height: 1.4;
}
.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>Daftar 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>Nama Pemesan</th>
<th>Status Order</th>
<th>Tanggal Antar</th>
<th>Waktu Makan <br/> /Jam Layanan</th>
<th>Menu</th>
<th>Karbohidrat</th>
<th>Total Kalori</th>
<th>Keterangan</th>
<th>Jumlah</th>
<th>Harga Satuan (Rp)</th>
</tr>
</thead>
<tbody>
@forelse ($pekerjaan as $i => $row)
<tr>
<td style="width: 5%;">{{ $i + 1 }}</td>
<td>
{{ $row['order']['nama_pemesan'] ?? '-' }}
@if (!empty($row['order']['jenis_customer']))
<br><small>({{ $row['order']['jenis_customer'] === "MCU" ? $row['order']['nama_institusi'] . '- ' . $row['order']['jenis_customer'] : $row['order']['jenis_customer']}})</small>
@endif
</td>
<td>{{ $row['status_order'] ?? '-' }}</td>
<td style="text-align: center;">
{{ isset($row['tgl_antar'])
? \Carbon\Carbon::parse($row['tgl_antar'])->locale('id')->translatedFormat('d F Y')
: '-' }}
</td>
<td>{{ $row['type'] ?? substr($row['jam_layanan'], 0, 5) }}</td>
<td>{{ $row['masterMcu']['nama_mcu'] ?? $row['menu']['nama_menu'] ?? '-' }}</td>
<td>
@if($row['karbohidrat'])
{{ $row['karbohidrat']['nama_karbohidrat'] }} ({{ $row['karbohidrat']['nilai_kalori'] ? $row['karbohidrat']['nilai_kalori'] . ' kkal' : '-' }})
@else
-
@endif
</td>
<td>{{ $row['total_kalori'] ? $row['total_kalori'] . ' kal' : '' }}</td>
<td class="keterangan">
@php
$jenis = strtolower($row['order']['jenis_customer'] ?? '');
@endphp
@if ($jenis === 'keluarga pasien / penunggu pasien')
Nama Pasien: <strong>{{ $row['order']['nama_pasien'] ?? '-' }}</strong><br>
Ruang: <strong>{{ $row['order']['ruang_perawatan'] ?? '-' }} / {{ $row['order']['no_kamar_perawatan'] ?? '-' }}</strong><br>
Kelas: <strong>{{ $row['order']['kelas_perawatan'] ?? '-' }}</strong>
@elseif ($jenis === 'masyarakat umum')
{{ $row['order']['alamat'] ?? '-' }}
@elseif ($jenis === 'karyawan rsab harapan kita')
Bagian: <strong>{{ $row['order']['bagian_instalasi'] ?? '-' }}</strong><br>
Ext: <strong>{{ $row['order']['no_ekstensien'] ?? '-' }}</strong>
@else
-
@endif
</td>
<td>{{ $row['jumlah'] ?? 0 }}</td>
<td>{{ number_format($row['harga_satuan'], 0, ',', '.') }}</td>
</tr>
@empty
<tr>
<td colspan="10" style="text-align: center; color: #888;">Tidak ada data</td>
</tr>
@endforelse
</tbody>
</table>
<div class="footer">
&copy; {{ date('Y') }} RSAB Harapan Kita Sistem Order Gizi
</div>
</body>
</html>