@extends('adminlte::page') @section('title', 'Financial Reports') @section('content_header')

Financial Reports

to
Back to Reports
@stop @section('content')

${{ number_format($revenueOverTime->sum('revenue'), 0) }}

Total Revenue

{{ $startDate->format('M j') }} - {{ $endDate->format('M j, Y') }}

${{ number_format($outstandingInvoices->sum('total_amount'), 0) }}

Outstanding

{{ $outstandingInvoices->count() }} invoices

{{ $revenueByType->count() }}

Case Types

Generating revenue
@php $efficiency = $billingEfficiency && $billingEfficiency->time_value > 0 ? round(($billingEfficiency->invoice_value / $billingEfficiency->time_value) * 100, 1) : 0; @endphp

{{ $efficiency }}%

Billing Efficiency

Invoice vs Time Value

Revenue Over Time

Revenue by Case Type

Outstanding Invoices

{{ $outstandingInvoices->count() }} invoices
@if($outstandingInvoices->count() > 0)
@foreach($outstandingInvoices->take(10) as $invoice) @endforeach
Invoice Client Amount Due Date Status
{{ $invoice->invoice_number }} {{ $invoice->client->display_name ?? 'N/A' }} ${{ number_format($invoice->total_amount, 0) }} {{ $invoice->due_date->format('M j, Y') }} @if($invoice->due_date < now())
{{ $invoice->due_date->diffForHumans() }} @endif
@php $statusColors = [ 'sent' => 'warning', 'partial' => 'info', 'paid' => 'success' ]; @endphp {{ ucfirst($invoice->status) }}
@if($outstandingInvoices->count() > 10) Showing top 10 of {{ $outstandingInvoices->count() }} outstanding invoices @endif @else

No outstanding invoices found.

@endif

Top Clients by Revenue

@if($topClients->count() > 0)
@foreach($topClients as $client) @endforeach
Client Type Revenue Invoices
@if($client->client_type === 'corporate') {{ $client->company_name }} @else {{ $client->first_name }} {{ $client->last_name }} @endif {{ ucfirst($client->client_type) }} ${{ number_format($client->total_revenue, 0) }} {{ $client->invoice_count }}
@else

No client revenue data available.

@endif
@if($billingEfficiency)

Billing Efficiency Analysis

${{ number_format($billingEfficiency->time_value, 0) }}
TIME VALUE Based on billable hours × rates
${{ number_format($billingEfficiency->invoice_value, 0) }}
INVOICE VALUE Actual invoiced amounts
@php $variance = $billingEfficiency->time_value > 0 ? $billingEfficiency->invoice_value - $billingEfficiency->time_value : 0; @endphp
${{ number_format(abs($variance), 0) }}
{{ $variance >= 0 ? 'MARKUP' : 'DISCOUNT' }} Difference from time value
@endif @stop @section('js') @stop