{{-- LOGO --}}

LAPORAN TRANSAKSI TIAP BULAN DALAM PERIODE TAHUN {{ $year }}

RSUD dr. SOERATNO GEMOLONG


IDENTITAS: {{ $data['header_name'] }}

@php $hasData = false; @endphp @foreach($data['details'] as $row) @if($row['has_data']) @php $hasData = true; @endphp @endif @endforeach @if(!$hasData) @endif
No Bulan Jenis BBM Liter Biaya
{{ $loop->iteration }} {{ $row['full_month_name'] }} {{ $row['fuel_type'] }} {{ number_format($row['liters'], 2) }} Rp {{ number_format($row['cost'], 0, ',', '.') }}
Belum ada data transaksi.
TOTAL {{ number_format($data['total_liters'], 2) }} Rp {{ number_format($data['total_cost'], 0, ',', '.') }}
{{-- GRAFIK 1: KONSUMSI LITER --}} @if($data['total_liters'] > 0)
Statistik Konsumsi (Liter)
{{-- BAGIAN 1: BATANG GRAFIK (ATAS GARIS) --}}
@foreach($data['details'] as $row) @php $maxGraphHeightPx = 100; $heightPx = 0; if($data['max_liter'] > 0 && $row['liters'] > 0) { $heightPx = ($row['liters'] / $data['max_liter']) * $maxGraphHeightPx; if($heightPx < 2) $heightPx = 2; } @endphp
@if($row['liters'] > 0)
{{ round($row['liters']) }}
@else
@endif {{-- HAPUS x-label DARI SINI --}}
@endforeach
{{-- BAGIAN 2: LABEL BULAN (BAWAH GARIS) --}}
@foreach($data['details'] as $row)
{{ $row['month_name'] }}
@endforeach
@endif {{-- GRAFIK 2: BIAYA --}} @if($data['total_cost'] > 0)
Statistik Biaya Bulanan (Rupiah)
{{-- BAGIAN 1: BATANG GRAFIK --}}
@foreach($data['details'] as $row) @php $maxGraphHeightPx = 100; $heightPx = 0; if($data['max_cost'] > 0 && $row['cost'] > 0) { $heightPx = ($row['cost'] / $data['max_cost']) * $maxGraphHeightPx; if($heightPx < 2) $heightPx = 2; } $costLabel = number_format($row['cost'], 0, ',', '.'); @endphp
@if($row['cost'] > 0)
{{ $costLabel }}
@else
@endif
@endforeach
{{-- BAGIAN 2: LABEL BULAN --}}
@foreach($data['details'] as $row)
{{ $row['month_name'] }}
@endforeach
@endif