<div class="table-responsive">
    <table class="table table-bordered table-striped table-hover mb-0">
        <thead class="bg-primary text-white">
            <tr>
                <th>Tanggal</th>
                <th>Keterangan</th>
                <th>Reff</th>
                <th class="text-right">Debet</th>
                <th class="text-right">Kredit</th>
            </tr>
        </thead>
        <tbody>
            @forelse($journal as $entry)
                <tr>
                    <td>{{ $entry['date'] }}</td>
                    <td class="{{ $entry['credit'] > 0 ? 'pl-4' : '' }}">
                        {{ $entry['desc'] }}
                    </td>
                    <td>{{ $entry['reff'] }}</td>
                    <td class="text-right">
                        {{ $entry['debit'] > 0 ? 'Rp' . number_format($entry['debit'], 0, ',', '.') : '-' }}
                    </td>
                    <td class="text-right">
                        {{ $entry['credit'] > 0 ? 'Rp' . number_format($entry['credit'], 0, ',', '.') : '-' }}
                    </td>
                </tr>
            @empty
                <tr>
                    <td colspan="5" class="text-center text-muted py-4">Belum ada data jurnal.</td>
                </tr>
            @endforelse
        </tbody>
    </table>
</div>
