<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>Laporan Buku</title>
    <style>
        body { font-family: DejaVu Sans, sans-serif; font-size: 11px; }
        table { width: 100%; border-collapse: collapse; }
        th, td { border: 1px solid #000; padding: 6px; }
        th { background: #eee; }
        h3 { text-align: center; margin-bottom: 10px; }
    </style>
</head>
<body>

<h3>LAPORAN BUKU PERPUSTAKAAN</h3>

<table>
    <thead>
        <tr>
            <th>No</th>
            <th>Judul</th>
            <th>Pengarang</th>
            <th>Kategori</th>
            <th>Transaksi</th>
            <th>Total Dipinjam</th>
            <th>Stok</th>
        </tr>
    </thead>
    <tbody>
        @foreach($laporan as $item)
        <tr>
            <td align="center">{{ $loop->iteration }}</td>
            <td>{{ $item->judul }}</td>
            <td>{{ $item->pengarang }}</td>
            <td align="center">{{ $item->kategori }}</td>
            <td align="center">{{ $item->total_transaksi }}</td>
            <td align="center">{{ $item->total_dipinjam }}</td>
            <td align="center">{{ $item->jumlah }}</td>
        </tr>
        @endforeach
    </tbody>
</table>

<br><br>
<p>Dicetak pada: {{ date('d-m-Y') }}</p>

</body>
</html>
