Profitability Analysis by Department
@if($selectedPeriod)
Total Revenue
{{ number_format($totalRevenue, 2) }}
From {{ $departments->count() }} departments
Total Cost
{{ number_format($totalCost, 2) }}
Including direct and indirect costs
Total Profit
{{ number_format($totalProfit, 2) }}
Profit Margin: {{ number_format($profitMargin, 2) }}%
Department Performance
@foreach($departmentPerformance as $department) @endforeach
Department Revenue Direct Cost Indirect Cost Total Cost Profit Profit Margin Trend
{{ $department->name }} {{ number_format($department->revenue, 2) }} {{ number_format($department->direct_cost, 2) }} {{ number_format($department->indirect_cost, 2) }} {{ number_format($department->total_cost, 2) }} {{ number_format($department->profit, 2) }} {{ number_format($department->profit_margin, 2) }}% @if($department->trend > 0) ↑ {{ number_format($department->trend, 2) }}% @elseif($department->trend < 0) ↓ {{ number_format(abs($department->trend), 2) }}% @else → 0% @endif
Department Transactions
@foreach($departmentTransactions as $transaction) @endforeach
Date Department Type Reference Description Amount Status
{{ $transaction->date->format('Y-m-d') }} {{ $transaction->department->name }} {{ ucfirst($transaction->type) }} {{ $transaction->reference }} {{ $transaction->description }} {{ number_format($transaction->amount, 2) }} {{ ucfirst($transaction->status) }}
Top Departments by Revenue
@foreach($topDepartmentsByRevenue as $department)
{{ $department->name }} {{ number_format($department->revenue, 2) }}
@endforeach
Top Departments by Profit
@foreach($topDepartmentsByProfit as $department)
{{ $department->name }} {{ number_format($department->profit, 2) }}
@endforeach
Department Cost Analysis
@foreach($departmentCosts as $cost) @endforeach
Department Personnel Cost Operating Cost Overhead Cost Total Cost Cost per Revenue
{{ $cost->department->name }} {{ number_format($cost->personnel_cost, 2) }} {{ number_format($cost->operating_cost, 2) }} {{ number_format($cost->overhead_cost, 2) }} {{ number_format($cost->total_cost, 2) }} {{ number_format($cost->cost_per_revenue, 2) }}%
@endif