64 lines
2.8 KiB
PHP
64 lines
2.8 KiB
PHP
@extends('layouts.app')
|
|
|
|
@section('content')
|
|
<div class="container-fluid p-4">
|
|
<div class="card shadow-sm p-3">
|
|
<h4 class="fw-bold" style="color: #063986;">Laporan Keuangan</h4>
|
|
|
|
<!-- Form Filter Laporan -->
|
|
<form method="GET" action="{{ route('admin.keuangan') }}" class="row g-3 mb-4">
|
|
<div class="col-md-5">
|
|
<label for="tahun" class="form-label">Pilih Tahun</label>
|
|
<select name="tahun" id="tahun" class="form-select">
|
|
@foreach ($years as $year)
|
|
<option value="{{ $year }}" {{ request()->tahun == $year ? 'selected' : '' }}>
|
|
{{ $year }}
|
|
</option>
|
|
@endforeach
|
|
</select>
|
|
</div>
|
|
<div class="col-md-5">
|
|
<label for="bulan" class="form-label">Pilih Bulan</label>
|
|
<select name="bulan" id="bulan" class="form-select">
|
|
<option value="">Semua Bulan</option>
|
|
@foreach ($months as $key => $month)
|
|
<option value="{{ $key }}" {{ request()->bulan == $key ? 'selected' : '' }}>
|
|
{{ $month }}
|
|
</option>
|
|
@endforeach
|
|
</select>
|
|
</div>
|
|
<div class="col-md-2 d-flex align-items-end">
|
|
<button type="submit" class="btn btn-primary w-100">Filter</button>
|
|
</div>
|
|
</form>
|
|
|
|
<!-- Tabel Laporan Keuangan -->
|
|
<div class="table-responsive">
|
|
<table class="table table-bordered text-center">
|
|
<thead class="table-primary">
|
|
<tr>
|
|
<th>Tahun</th>
|
|
<th>Bulan</th>
|
|
<th>Total Pemasukan</th>
|
|
<th>Total Pengeluaran</th>
|
|
<th>Keuntungan Bersih</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach($filteredLaporan as $row)
|
|
<tr>
|
|
<td>{{ $row->tahun }}</td>
|
|
<td>{{ $row->bulan }}</td>
|
|
<td>Rp {{ number_format($row->total_pemasukan, 0, ',', '.') }}</td>
|
|
<td>Rp {{ number_format($row->total_pengeluaran, 0, ',', '.') }}</td>
|
|
<td>Rp {{ number_format($row->keuntungan_bersih, 0, ',', '.') }}</td>
|
|
</tr>
|
|
@endforeach
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
@endsection |