171 lines
5.1 KiB
PHP
171 lines
5.1 KiB
PHP
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>{{ $title ?? 'Laporan Detail Per Nampan' }}</title>
|
|
<style>
|
|
body {
|
|
font-family: sans-serif;
|
|
font-size: 10px;
|
|
margin: 0;
|
|
padding: 10px;
|
|
}
|
|
.header {
|
|
text-align: center;
|
|
margin-bottom: 20px;
|
|
border-bottom: 2px solid #333;
|
|
padding-bottom: 10px;
|
|
}
|
|
.header h2 {
|
|
margin: 0 0 10px 0;
|
|
font-size: 16px;
|
|
color: #333;
|
|
}
|
|
.filter-info {
|
|
background-color: #f8f9fa;
|
|
padding: 10px;
|
|
border-radius: 5px;
|
|
margin-bottom: 15px;
|
|
border-left: 4px solid #007bff;
|
|
}
|
|
.filter-info h3 {
|
|
margin: 0 0 8px 0;
|
|
font-size: 12px;
|
|
color: #333;
|
|
}
|
|
.filter-item {
|
|
margin: 3px 0;
|
|
font-size: 10px;
|
|
}
|
|
.filter-label {
|
|
font-weight: bold;
|
|
color: #666;
|
|
}
|
|
table {
|
|
width: 100%;
|
|
border-collapse: collapse;
|
|
margin-bottom: 15px;
|
|
font-size: 9px;
|
|
}
|
|
th, td {
|
|
border: 1px solid #ddd;
|
|
padding: 8px;
|
|
text-align: left;
|
|
}
|
|
th {
|
|
background-color: #f8f9fa;
|
|
font-weight: bold;
|
|
color: #333;
|
|
}
|
|
.text-right { text-align: right; }
|
|
.text-center { text-align: center; }
|
|
.rekap-section {
|
|
background-color: #e9ecef;
|
|
padding: 10px;
|
|
margin-bottom: 15px;
|
|
border-radius: 5px;
|
|
}
|
|
.rekap-title {
|
|
font-weight: bold;
|
|
margin-bottom: 8px;
|
|
color: #333;
|
|
}
|
|
.rekap-item {
|
|
display: inline-block;
|
|
margin-right: 20px;
|
|
font-size: 10px;
|
|
}
|
|
.rekap-label {
|
|
font-weight: bold;
|
|
color: #666;
|
|
}
|
|
.no-data {
|
|
text-align: center;
|
|
font-style: italic;
|
|
color: #666;
|
|
}
|
|
.page-footer {
|
|
position: fixed;
|
|
bottom: 10px;
|
|
right: 10px;
|
|
font-size: 8px;
|
|
color: #666;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="header">
|
|
<h2>{{ $title ?? 'Laporan Detail Per Nampan' }}</h2>
|
|
</div>
|
|
|
|
@if(isset($data['filter']))
|
|
<div class="filter-info">
|
|
<h3>Informasi Filter</h3>
|
|
<div class="filter-item">
|
|
<span class="filter-label">Tanggal:</span> {{ $data['filter']['tanggal'] }}
|
|
</div>
|
|
@if($data['filter']['nama_sales'])
|
|
<div class="filter-item">
|
|
<span class="filter-label">Sales:</span> {{ $data['filter']['nama_sales'] }}
|
|
</div>
|
|
@endif
|
|
@if($data['filter']['produk'])
|
|
<div class="filter-item">
|
|
<span class="filter-label">Produk:</span> {{ $data['filter']['produk'] }}
|
|
</div>
|
|
@endif
|
|
@if($data['filter']['nama_pembeli'])
|
|
<div class="filter-item">
|
|
<span class="filter-label">Nama Pembeli:</span> {{ $data['filter']['nama_pembeli'] }}
|
|
</div>
|
|
@endif
|
|
</div>
|
|
@endif
|
|
|
|
@if(isset($data['rekap_harian']))
|
|
<div class="rekap-section">
|
|
<div class="rekap-title">Rekap Harian</div>
|
|
<div class="rekap-item">
|
|
<span class="rekap-label">Total Item Terjual:</span> {{ $data['rekap_harian']['total_item_terjual'] }}
|
|
</div>
|
|
<div class="rekap-item">
|
|
<span class="rekap-label">Total Berat:</span> {{ $data['rekap_harian']['total_berat_terjual'] }}
|
|
</div>
|
|
<div class="rekap-item">
|
|
<span class="rekap-label">Total Pendapatan:</span> {{ $data['rekap_harian']['total_pendapatan'] }}
|
|
</div>
|
|
</div>
|
|
@endif
|
|
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th style="width: 40%;">Nama Nampan</th>
|
|
<th style="width: 20%;" class="text-center">Jumlah Item Terjual</th>
|
|
<th style="width: 20%;" class="text-right">Berat Terjual</th>
|
|
<th style="width: 20%;" class="text-right">Pendapatan</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@if(isset($data['nampan']) && count($data['nampan']) > 0)
|
|
@foreach($data['nampan'] as $item)
|
|
<tr>
|
|
<td>{{ $item['nama_nampan'] }}</td>
|
|
<td class="text-center">{{ $item['jumlah_item_terjual'] }}</td>
|
|
<td class="text-right">{{ $item['berat_terjual'] }}</td>
|
|
<td class="text-right">{{ $item['pendapatan'] }}</td>
|
|
</tr>
|
|
@endforeach
|
|
@else
|
|
<tr>
|
|
<td colspan="4" class="no-data">Tidak ada data untuk ditampilkan</td>
|
|
</tr>
|
|
@endif
|
|
</tbody>
|
|
</table>
|
|
|
|
<div class="page-footer">
|
|
Dicetak pada: {{ \Carbon\Carbon::now()->isoFormat('dddd, D MMMM Y - HH:mm') }} WIB
|
|
</div>
|
|
</body>
|
|
</html> |