Muhammad Thoriq 7966b1f95d Set Project
2025-04-27 20:58:13 +07:00

63 lines
1.7 KiB
PHP

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Struk Belanja</title>
<style>
body {
font-family: Arial, sans-serif;
}
.header, .footer {
text-align: center;
}
.items {
width: 100%;
margin-top: 20px;
border-top: 1px solid #000;
border-bottom: 1px solid #000;
}
.items th, .items td {
padding: 8px;
text-align: left;
}
.total {
font-weight: bold;
font-size: 18px;
}
</style>
</head>
<body>
<div class="header">
<h2>{{$transaksi->nomor_urut}}</h2>
<p>{{ date('d-m-Y H:i:s', strtotime($transaksi->created_at)) }}</p>
</div>
<table class="items">
<thead>
</thead>
<tbody>
@foreach ($transaksi_detail as $item)
@if ($item->tindakan_id == -1)
<tr>
<td>Tambahan</td>
<td>Rp.{{ number_format($item->tarif, 0, ',', '.') }}</td>
</tr>
@else
<tr>
<td>{{ $item->tindakan_name }}</td>
<td>Rp.{{ number_format($item->tarif, 0, ',', '.') }}</td>
</tr>
@endif
@endforeach
<tr>
<td><strong>TOTAL</strong></td>
<td><strong>Rp.{{ number_format($transaksi->total, 0, ',', '.') }}</strong></td>
</tr>
</tbody>
</table>
</body>
</html>