{{-- resources/views/reports/financial.blade.php --}} @extends('layouts.app') @section('title', 'Financial Summary') @section('page_title', 'Financial Summary') @section('page_subtitle', $from->format('d M Y') . ' — ' . $to->format('d M Y')) @section('content') @include('reports.partials.nav') @include('reports.partials.filters', ['route' => 'reports.financial']) {{-- P&L Summary --}}
${{ number_format($revenue, 0) }}
Revenue
${{ number_format($expenses, 0) }}
Expenses
${{ number_format(abs($gross_profit), 0) }}
Gross Profit {{ $profit_margin }}% margin
${{ number_format($outstanding, 0) }}
Outstanding
{{-- P&L Summary Card --}}
Profit & Loss Summary
Total Revenue ${{ number_format($revenue, 2) }}
Total Expenses (${{ number_format($expenses, 2) }})
Gross Profit ${{ number_format($gross_profit, 2) }}
Profit Margin {{ $profit_margin }}%
Outstanding Invoices ${{ number_format($outstanding, 2) }}
{{-- Expenses by Category --}}
Expenses by Category
@php $expTotal = $expenses_by_category->sum(); @endphp @forelse($expenses_by_category as $category => $amount)
{{ $category }} ${{ number_format($amount, 0) }} ({{ $expTotal > 0 ? round(($amount / $expTotal) * 100, 0) : 0 }}%)
@empty

No expenses in this period

@endforelse
@endsection