@extends('layouts.blank') @section('title', 'Laporan Laba Rugi') @push('styles') @endpush @push('scripts') @endpush @section('content')

@yield('title')

Periode: {{ $startDate }} - {{ $endDate }}

@foreach ($data as $unit) {{-- UNIT USAHA --}} @foreach ($unit['l1'] as $l1) {{-- LEVEL 1 --}} @foreach ($l1['l2'] as $l2) {{-- LEVEL 2 --}} @foreach ($l2['l3'] as $l3) {{-- LEVEL 3 --}} @endforeach @endforeach @endforeach @endforeach
Kode Akun Unit Usaha Jumlah
{{ $unit['name'] }}
{{ $l1['name'] }} {{ number_format($l1['amount'], 0, ',', '.') }}
{{ $l2['name'] }} {{ number_format($l2['amount'], 0, ',', '.') }}
{{ $l3['name'] }} {{ number_format($l3['amount'], 0, ',', '.') }}
TOTAL LABA / RUGI {{ number_format(collect($data)->sum(fn($u) => collect($u['l1'])->sum('amount')), 0, ',', '.') }}
@if (request('format') !== 'pdf') @endif @endsection