@extends('layouts.app') @section('title', 'View Cash Flow') @section('page-title', 'Cash Flow Statement') @section('content')
Cash Flow Statement #{{ $cashFlow->id }}

{{ $cashFlow->company->name }} - {{ $cashFlow->project->name }} ({{ $cashFlow->year }})

Company
{{ $cashFlow->company->name }}
Project
{{ $cashFlow->project->name }}
Year
{{ $cashFlow->year }}
Created By
{{ $cashFlow->created_by }}
@foreach($monthlyTotals as $month => $data) @endforeach @foreach($monthlyTotals as $month => $data) @endforeach @if($inflowItems->count() > 0) @foreach($inflowItems as $particularName => $items) @php $totalBudget = 0; $totalActual = 0; @endphp @foreach($monthlyTotals as $month => $data) @php $item = $items->firstWhere('month', $month); $budget = $item ? $item->budget : 0; $actual = $item ? $item->actual : 0; $totalBudget += $budget; $totalActual += $actual; @endphp @endforeach @endforeach @php $grandTotalInflowBudget = 0; $grandTotalInflowActual = 0; @endphp @foreach($monthlyTotals as $month => $data) @php $grandTotalInflowBudget += $data['inflow_budget']; $grandTotalInflowActual += $data['inflow_actual']; @endphp @endforeach @endif @if($outflowItems->count() > 0) @foreach($outflowItems as $particularName => $items) @php $totalBudget = 0; $totalActual = 0; @endphp @foreach($monthlyTotals as $month => $data) @php $item = $items->firstWhere('month', $month); $budget = $item ? $item->budget : 0; $actual = $item ? $item->actual : 0; $totalBudget += $budget; $totalActual += $actual; @endphp @endforeach @endforeach @php $grandTotalOutflowBudget = 0; $grandTotalOutflowActual = 0; @endphp @foreach($monthlyTotals as $month => $data) @php $grandTotalOutflowBudget += $data['outflow_budget']; $grandTotalOutflowActual += $data['outflow_actual']; @endphp @endforeach @endif @php $grandNetBudget = 0; $grandNetActual = 0; @endphp @foreach($monthlyTotals as $month => $data) @php $grandNetBudget += $data['net_budget']; $grandNetActual += $data['net_actual']; @endphp @endforeach
Particulars{{ $months[$month] }}Total
Budget ActualBudget Actual
Cash Inflows
{{ $particularName }}{{ number_format($budget, 2) }} {{ number_format($actual, 2) }}{{ number_format($totalBudget, 2) }} {{ number_format($totalActual, 2) }}
Total Inflows{{ number_format($data['inflow_budget'], 2) }} {{ number_format($data['inflow_actual'], 2) }}{{ number_format($grandTotalInflowBudget, 2) }} {{ number_format($grandTotalInflowActual, 2) }}
Cash Outflows
{{ $particularName }}{{ number_format($budget, 2) }} {{ number_format($actual, 2) }}{{ number_format($totalBudget, 2) }} {{ number_format($totalActual, 2) }}
Total Outflows{{ number_format($data['outflow_budget'], 2) }} {{ number_format($data['outflow_actual'], 2) }}{{ number_format($grandTotalOutflowBudget, 2) }} {{ number_format($grandTotalOutflowActual, 2) }}
Net Cash Flow {{ number_format($data['net_budget'], 2) }} {{ number_format($data['net_actual'], 2) }} {{ number_format($grandNetBudget, 2) }} {{ number_format($grandNetActual, 2) }}

Created: {{ $cashFlow->created_at->format('M d, Y h:i A') }}

Last Updated: {{ $cashFlow->updated_at->format('M d, Y h:i A') }}

Total Items: {{ $cashFlow->items->count() }}

@endsection