@extends('layouts.bootstrap') @section('title', 'Cash Flow Report') @section('content')

Cash Flow Report

Back to Dashboard

Product Price Management

Cash Flow Statement

Period: {{ $startDate->format('F d, Y') }} to {{ $endDate->format('F d, Y') }}

Monthly Cash Flow
@php $runningBalance = 0; $totalCashIn = 0; $totalCashOut = 0; @endphp @foreach($monthlyData as $month => $data) @php $cashIn = $data['income'] ?? 0; $cashOut = $data['expenses'] ?? 0; $netFlow = $cashIn - $cashOut; $runningBalance += $netFlow; $totalCashIn += $cashIn; $totalCashOut += $cashOut; @endphp @endforeach @if(empty($monthlyData)) @endif
Month Cash In (Income) Cash Out (Expenses) Net Cash Flow Running Balance
{{ \Carbon\Carbon::parse($month)->format('F Y') }} ${{ number_format($cashIn, 2) }} ${{ number_format($cashOut, 2) }} ${{ number_format($netFlow, 2) }} ${{ number_format($runningBalance, 2) }}
No data available for this period
Total ${{ number_format($totalCashIn, 2) }} ${{ number_format($totalCashOut, 2) }} ${{ number_format($totalCashIn - $totalCashOut, 2) }} ${{ number_format($runningBalance, 2) }}
Cash Flow Summary

${{ number_format($totalCashIn, 2) }}

Total Cash Inflow

${{ number_format($totalCashOut, 2) }}

Total Cash Outflow

${{ number_format($totalCashIn - $totalCashOut, 2) }}

Net Cash Flow
Key Insights
@if($totalCashIn > 0)
Cash Flow Ratio:
{{ number_format(($totalCashOut / $totalCashIn) * 100, 1) }}% of income spent
@endif @php $positiveMonths = collect($monthlyData)->filter(function($data) { return ($data['income'] ?? 0) - ($data['expenses'] ?? 0) > 0; })->count(); $totalMonths = count($monthlyData); @endphp @if($totalMonths > 0)
Positive Months:
{{ $positiveMonths }} of {{ $totalMonths }} months ({{ number_format(($positiveMonths / $totalMonths) * 100, 1) }}%)
@endif @if($totalCashIn > 0 && $totalCashOut > 0)
Average Monthly:
Income: ${{ number_format($totalCashIn / max(1, $totalMonths), 2) }}
Expenses: ${{ number_format($totalCashOut / max(1, $totalMonths), 2) }}
@endif @if($runningBalance < 0)
Warning: Negative cash flow detected. Consider reviewing expenses.
@elseif($runningBalance > 0)
Good: Positive cash flow indicates healthy financial position.
@endif
@endsection