@extends('layouts.app') @section('title', 'Financial Report - ' . $project->name) @section('content')
{{ $project->name }}
{{ $project->description ?? 'No description' }}
Report generated: {{ now()->format('M d, Y H:i') }}
{{ str_replace('_', ' ', ucfirst($project->status)) }}
{{ ucfirst($project->priority) }}
@if($project->start_date) {{ $project->start_date->format('M d, Y') }} @if($project->end_date) — {{ $project->end_date->format('M d, Y') }} @endif @else Not set @endif
{{ $project->assignedUser->name ?? 'Unassigned' }}
Budget
{{ $budget ? '$' . number_format($budget, 2) : 'Not set' }}
Total Income
${{ number_format($totalIncome, 2) }}
Total Expenses
${{ number_format($totalExpense, 2) }}
Net Balance
${{ number_format($netBalance, 2) }}
@if($budgetRemaining > 0) ${{ number_format($budgetRemaining, 2) }} remaining ({{ number_format(100 - $budgetUtilization, 1) }}%) @else Budget fully utilized @endif
No transactions categorized
@endifProfit Margin
{{ number_format($profitMargin, 1) }}%
{{ $profitMargin >= 0 ? 'Profitable' : 'Loss-making' }} @if($totalIncome == 0 && $totalExpense == 0)(no transactions)@elseif($totalIncome == 0)(no income)@endif
Budget Remaining
${{ number_format($budgetRemaining, 2) }}
{{ number_format(100 - $budgetUtilization, 1) }}% remaining
Income vs Expenses Ratio
{{ $totalExpense > 0 ? number_format($totalIncome / $totalExpense, 2) : ($totalIncome > 0 ? 'N/A (no expenses)' : 'N/A') }}
Average Transaction
${{ number_format($transactions->count() > 0 ? ($totalIncome + $totalExpense) / $transactions->count() : 0, 2) }}
| Date | Type | Description | Category | Amount |
|---|---|---|---|---|
| {{ $txn->date->format('M d, Y') }} | @if($txn->type === 'income') Income @else Expense @endif | {{ $txn->description }} | {{ $txn->category ?? '-' }} | {{ $txn->type === 'income' ? '+' : '-' }}${{ number_format($txn->amount, 2) }} |
| No transactions recorded | ||||
| Total | +${{ number_format($totalIncome, 2) }} -${{ number_format($totalExpense, 2) }} | |||