103 lines
2.8 KiB
PHP
103 lines
2.8 KiB
PHP
<!DOCTYPE html>
|
|
<html lang="en">
|
|
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<title>Billing Pasien</title>
|
|
<style>
|
|
body {
|
|
font-family: Arial, sans-serif;
|
|
padding: 20px;
|
|
}
|
|
|
|
table {
|
|
width: 100%;
|
|
border-collapse: collapse;
|
|
margin-top: 20px;
|
|
}
|
|
|
|
th,
|
|
td {
|
|
border: 1px solid #ddd;
|
|
padding: 8px;
|
|
text-align: left;
|
|
}
|
|
|
|
th {
|
|
background-color: #f4f4f4;
|
|
}
|
|
|
|
h2 {
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
.info {
|
|
margin-top: 10px;
|
|
}
|
|
|
|
.header-info {
|
|
font-weight: bold;
|
|
}
|
|
|
|
.footer {
|
|
margin-top: 20px;
|
|
text-align: right;
|
|
font-weight: bold;
|
|
}
|
|
</style>
|
|
</head>
|
|
|
|
<body onload="window.print()">
|
|
|
|
<h2>Billing Pasien</h2>
|
|
<div class="info">
|
|
<p><span class="header-info">Nama:</span> {{ $registrasi->pasien->NamaPasien }}</p>
|
|
<p><span class="header-info">No Registrasi:</span> {{ $registrasi->NoRegistrasi }}</p>
|
|
<p><span class="header-info">Tanggal Registrasi:</span> {{ \Carbon\Carbon::parse($registrasi->TanggalRegistrasi)->format('d/m/Y') }}</p>
|
|
<p><span class="header-info">Ruangan:</span> {{ $registrasi->ruanganPelayanan->NamaRuangPelayanan }}</p>
|
|
<p><span class="header-info">Dokter:</span> {{ $registrasi->pegawai->NamaPegawai }}</p>
|
|
|
|
</div>
|
|
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>No</th>
|
|
<th>Nama Tindakan</th>
|
|
<th>Tarif Satuan</th>
|
|
<th>Jumlah</th>
|
|
<th>Total</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@php $grandTotal = 0; @endphp
|
|
@foreach ($transaksiList as $index => $trx)
|
|
@php
|
|
$total = ($trx->tindakan->TarifTindakan ?? 0) * $trx->JmlTindakan;
|
|
$grandTotal += $total;
|
|
@endphp
|
|
<tr>
|
|
<td>{{ $index + 1 }}</td>
|
|
<td>{{ $trx->tindakan->NamaTindakan ?? '-' }}</td>
|
|
<td>Rp {{ number_format($trx->tindakan->TarifTindakan ?? 0, 0, ',', '.') }}</td>
|
|
<td>{{ $trx->JmlTindakan }}</td>
|
|
<td>Rp {{ number_format($total, 0, ',', '.') }}</td>
|
|
</tr>
|
|
@endforeach
|
|
</tbody>
|
|
<tfoot>
|
|
<tr>
|
|
<th colspan="4" style="text-align: right;">Sub Total:</th>
|
|
<th>Rp {{ number_format($grandTotal, 0, ',', '.') }}</th>
|
|
</tr>
|
|
</tfoot>
|
|
</table>
|
|
|
|
<div class="footer">
|
|
<p><span class="header-info">Total:</span> Rp {{ number_format($grandTotal, 0, ',', '.') }}</p>
|
|
</div>
|
|
|
|
</body>
|
|
|
|
</html>
|