{{-- @php
$date = date('d/m/Y');
header('Content-type: application/octet-stream');
header('Content-Disposition: attachment; filename=' . $filename);
header('Pragma: no-cache');
header('Expires: 0');
@endphp --}}
<style type="text/css">
/* table {
text-align: center;
} */
* {
font-family: Arial, sans-serif;
}
.table-data {
border-collapse: collapse;
width: 100%;
}
.th-data,
.td-data {
border: 1px solid #ddd;
padding: 8px;
text-align: left;
font-size: 12px;
}
.th-data {
background-color: #f2f2f2;
}
</style>
@php
$timezone = new \DateTimeZone('Asia/Makassar');
$date = new DateTime();
$date->setTimeZone($timezone);
$total_keluar = 0;
$total_masuk = 0;
$hari = ['NULL', 'senin', 'selasa', 'rabu', 'kamis', "jum'at", 'sabtu', 'minggu'];
@endphp
<h4 style="text-align: center;">TOTAL JUMLAH SURAT DUKUNGAN</h4>
<div style="float: left">
<span>{{ strtoupper($hari[$date->format('N')]) }} {{ $date->format('d/m/Y') }}</span>
</div>
<div style="float: right">
<span>JAM {{ $date->format('H:i') }} WITA</span>
</div>
<table id="example2" class="table-data" style="width: 100%; margin-top: 30px;"
class="table-responsive no-padding table table-bordered table-hover">
<thead>
<tr>
<th class="th-data" style="text-align: center">NO</th>
<th class="th-data" style="text-align: center">HARI</th>
<th class="th-data" style="text-align: center">TANGGAL</th>
<th class="th-data" style="text-align: center">JUMLAH SURDUK KELUAR </th>
<th class="th-data" style="text-align: center">JUMLAH SURDUK MASUK </th>
</tr>
</thead>
<tbody>
@foreach ($datas as $a)
<tr>
<td class="td-data">{{ $no++ }}</td>
<td class="td-data">{{ strtoupper($hari[date('N', strtotime($a->date))]) }}</td>
<td class="td-data">{{ date('d/m/Y', strtotime($a->tanggal)) }}</td>
<td class="td-data">{{ $a->surduk_keluar }}</td>
<td class="td-data">{{ $a->surduk_masuk }}</td>
</tr>
{{-- <td>{{ $a->total }}</td> --}}
@php
$total_keluar += $a->surduk_keluar;
$total_masuk += $a->surduk_masuk;
@endphp
@endforeach
<tr>
<th colspan="3" class="td-data" style="text-align: center;">JUMLAH</th>
<th class="td-data">{{ $total_keluar }}</th>
<th class="td-data">{{ $total_masuk }}</th>
</tr>
</tbody>
</table>
Anons79 File Manager Version 1.0, Coded By Anons79
Email: [email protected]