@extends('layouts.app') @section('title', 'Cash Flow Analysis - Blackberry Farm Analytics') @section('content')
← Analytics Dashboard 🎯 Scenario Comparison ⚖️ Break-Even Analysis 🎲 Monte Carlo

⚙️ Cash Flow Parameters

${{ number_format($cashFlowData['summary']['total_revenue']) }}
Total Revenue
{{ $years }} year projection
${{ number_format($cashFlowData['summary']['total_costs']) }}
Total Costs
All expenses included
${{ number_format($cashFlowData['summary']['net_cash_flow']) }}
Net Cash Flow
{{ $cashFlowData['summary']['net_cash_flow'] >= 0 ? 'Positive' : 'Negative' }} flow
${{ number_format($cashFlowData['summary']['peak_cash_need']) }}
Peak Cash Need
Maximum outflow

📊 Monthly Cash Flow Projection

🍂 Seasonal Cash Flow Patterns

@foreach(['Spring', 'Summer', 'Fall', 'Winter'] as $season) @php $seasonData = $cashFlowData['seasonal_breakdown'][$season]; $seasonColor = $season === 'Spring' ? 'green' : ($season === 'Summer' ? 'orange' : ($season === 'Fall' ? 'blue' : 'purple')); @endphp

{{ $season === 'Spring' ? '🌸' : ($season === 'Summer' ? '☀️' : ($season === 'Fall' ? '🍂' : '❄️')) }} {{ $season }}

${{ number_format($seasonData['revenue']) }}
Revenue
${{ number_format($seasonData['costs']) }}
Costs
${{ number_format($seasonData['net_flow']) }}
Net Flow
Key Activities:
{{ $seasonData['activities'] }}
@endforeach

📈 Cumulative Cash Flow Analysis

📋 Detailed Monthly Breakdown

@foreach($cashFlowData['monthly_breakdown'] as $month => $data) @endforeach
Month Revenue Operating Costs Labor Costs Setup Costs Net Flow Cumulative
{{ $month }} ${{ number_format($data['revenue']) }} ${{ number_format($data['operating_costs']) }} ${{ number_format($data['labor_costs']) }} ${{ number_format($data['setup_costs']) }} ${{ number_format($data['net_flow']) }} ${{ number_format($data['cumulative']) }}

💡 Cash Flow Insights

@php $insights = []; // Peak cash requirement insight $peakCash = $cashFlowData['summary']['peak_cash_need']; if ($peakCash > 0) { $insights[] = "Peak cash requirement of $" . number_format($peakCash) . " will be needed for optimal operations."; } // Seasonal concentration $harvestMonths = ['July', 'August', 'September']; $harvestRevenue = 0; foreach ($harvestMonths as $month) { if (isset($cashFlowData['monthly_breakdown'][$month])) { $harvestRevenue += $cashFlowData['monthly_breakdown'][$month]['revenue']; } } $harvestPercent = $cashFlowData['summary']['total_revenue'] > 0 ? ($harvestRevenue / $cashFlowData['summary']['total_revenue']) * 100 : 0; if ($harvestPercent > 70) { $insights[] = number_format($harvestPercent, 1) . "% of revenue is concentrated in harvest months (July-September)."; } // Negative cash flow periods $negativePeriods = 0; foreach ($cashFlowData['monthly_breakdown'] as $month => $data) { if ($data['cumulative'] < 0) $negativePeriods++; } if ($negativePeriods > 0) { $insights[] = "You may experience negative cash flow for $negativePeriods months - consider financing options."; } else { $insights[] = "Positive cash flow maintained throughout the year - excellent financial health."; } // ROI insight $annualROI = $cashFlowData['summary']['total_costs'] > 0 ? (($cashFlowData['summary']['net_cash_flow'] / $cashFlowData['summary']['total_costs']) * 100) / $years : 0; if ($annualROI > 15) { $insights[] = "Strong ROI of " . number_format($annualROI, 1) . "% annually indicates excellent investment potential."; } elseif ($annualROI > 5) { $insights[] = "Moderate ROI of " . number_format($annualROI, 1) . "% annually - consider optimization strategies."; } else { $insights[] = "Low ROI of " . number_format($annualROI, 1) . "% annually - review pricing and cost structure."; } @endphp
@foreach($insights as $insight)

💡 {{ $insight }}

@endforeach
📋 Recommendations:
  • Maintain cash reserves of ${{ number_format($cashFlowData['summary']['peak_cash_need'] * 1.2) }} for safety
  • Consider diversifying revenue streams to reduce seasonal concentration
  • Plan major investments during positive cash flow periods
  • @if($negativePeriods > 0)
  • Arrange line of credit for {{ $negativePeriods }} months of potential shortfalls
  • @endif

⚙️ Analysis Configuration

🔧 Modify Parameters
Analysis Parameters:
  • {{ number_format($plantCount) }} plants analyzed
  • {{ $years }} year{{ $years > 1 ? 's' : '' }} projection
  • Monthly cash flow modeling
Revenue Assumptions:
  • Yield: {{ $config['revenue']['yield_per_plant_lbs'] }} lbs/plant
  • Price: ${{ number_format($config['revenue']['market_price_per_lb'], 2) }}/lb
  • Harvest: {{ $config['revenue']['harvest_season_weeks'] }} weeks
Cost Structure:
  • Operating: ${{ number_format($config['operating_costs']['current_scale_per_plant']) }}/plant
  • Labor: {{ $config['labor']['hours_per_plant_per_year'] }}h @ ${{ number_format($config['labor']['hourly_rate']) }}/h
  • Setup: ${{ number_format($config['setup_costs']['small_expansion_per_plant']) }}/plant
@endsection @push('scripts') @endpush