37 lines
1.4 KiB
PHP
37 lines
1.4 KiB
PHP
<div class="table-responsive">
|
|
<table class="table table-bordered table-striped table-hover mb-0">
|
|
<thead class="bg-secondary text-white">
|
|
<tr>
|
|
<th>Tanggal</th>
|
|
<th>Akun</th>
|
|
<th>Keterangan</th>
|
|
<th class="text-right">Debet</th>
|
|
<th class="text-right">Kredit</th>
|
|
<th class="text-right">Saldo</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@forelse($ledger as $entry)
|
|
<tr>
|
|
<td>{{ $entry['date'] }}</td>
|
|
<td>{{ $entry['account'] }}</td>
|
|
<td>{{ $entry['desc'] }}</td>
|
|
<td class="text-right text-success">
|
|
{{ $entry['debit'] > 0 ? 'Rp' . number_format($entry['debit'], 0, ',', '.') : '-' }}
|
|
</td>
|
|
<td class="text-right text-danger">
|
|
{{ $entry['credit'] > 0 ? 'Rp' . number_format($entry['credit'], 0, ',', '.') : '-' }}
|
|
</td>
|
|
<td class="text-right font-weight-bold">
|
|
Rp{{ number_format($entry['balance'], 0, ',', '.') }}
|
|
</td>
|
|
</tr>
|
|
@empty
|
|
<tr>
|
|
<td colspan="6" class="text-center text-muted py-4">Belum ada data transaksi.</td>
|
|
</tr>
|
|
@endforelse
|
|
</tbody>
|
|
</table>
|
|
</div>
|