@extends('layouts.app', ['page' => 'Monthly Income Statement', 'pageSlug' => 'reports-income-statement-monthly', 'section' => 'reports']) @section('content')

Monthly Income Statement

Standard View

{{ config('app.name') }}

Monthly Income Statement

For the Year {{ $year }}
@foreach($months as $month) @endforeach @foreach($revenues as $account) @php $yearTotal = 0; @endphp @foreach($months as $index => $month) @php $monthlyBalance = $monthlyBalances[$account->id][$index] ?? 0; $yearTotal += $monthlyBalance; @endphp @endforeach @endforeach @foreach($months as $index => $month) @php $monthlyTotal = 0; foreach($revenues as $account) { $monthlyTotal += $monthlyBalances[$account->id][$index] ?? 0; } @endphp @endforeach @foreach($expenses as $account) @php $yearTotal = 0; @endphp @foreach($months as $index => $month) @php $monthlyBalance = $monthlyBalances[$account->id][$index] ?? 0; $yearTotal += $monthlyBalance; @endphp @endforeach @endforeach @foreach($months as $index => $month) @php $monthlyTotal = 0; foreach($expenses as $account) { $monthlyTotal += $monthlyBalances[$account->id][$index] ?? 0; } @endphp @endforeach @foreach($months as $index => $month) @php $revenueMonthly = 0; $expenseMonthly = 0; foreach($revenues as $account) { $revenueMonthly += $monthlyBalances[$account->id][$index] ?? 0; } foreach($expenses as $account) { $expenseMonthly += $monthlyBalances[$account->id][$index] ?? 0; } $netIncomeMonthly = $revenueMonthly - $expenseMonthly; @endphp @endforeach
Account{{ $month }}Total
REVENUE
{{ $account->name }}{{ formatMoney($monthlyBalance) }}{{ formatMoney($yearTotal) }}
TOTAL REVENUE{{ formatMoney($monthlyTotal) }} @php $yearTotalRevenue = 0; foreach($revenues as $account) { foreach($months as $index => $month) { $yearTotalRevenue += $monthlyBalances[$account->id][$index] ?? 0; } } @endphp {{ formatMoney($yearTotalRevenue) }}
EXPENSES
{{ $account->name }}{{ formatMoney($monthlyBalance) }}{{ formatMoney($yearTotal) }}
TOTAL EXPENSES{{ formatMoney($monthlyTotal) }} @php $yearTotalExpenses = 0; foreach($expenses as $account) { foreach($months as $index => $month) { $yearTotalExpenses += $monthlyBalances[$account->id][$index] ?? 0; } } @endphp {{ formatMoney($yearTotalExpenses) }}
NET INCOME{{ formatMoney($netIncomeMonthly) }} @php $yearTotalNetIncome = 0; foreach($months as $index => $month) { $yearTotalNetIncome += $netIncomeMonthly; } @endphp {{ formatMoney($yearTotalNetIncome) }}
@endsection