@extends('layouts.finance') @section('title', 'Running Profit') @section('subtitle', 'All-time net profit year by year — are we in overall profit or loss') @section('content') @php $displayCurrency = 'PKR'; $fmt = fn ($usd) => $metrics->moneyIn((float) $usd, 'USD', $displayCurrency); $running = $runningProfit ?? ['years' => [], 'overall' => 0, 'current_year' => now()->year, 'current_year_profit' => 0]; $years = collect($running['years'] ?? []); $overall = (float) ($running['overall'] ?? 0); $overallPositive = $overall >= 0; $currentYear = $running['current_year'] ?? now()->year; $currentYearProfit = (float) ($running['current_year_profit'] ?? 0); @endphp {{-- Back link --}}
Back to Dashboard
{{-- Headline: overall running profit / loss --}}
Overall Running Profit (All Time)
{{ $fmt($overall) }}
{{ $overallPositive ? 'In overall PROFIT' : 'In overall LOSS' }}
This Year ({{ $currentYear }}) — Year to Date
{{ $fmt($currentYearProfit) }}
Revenue − voucher cost − redeemed points − expenses
{{-- Year-wise breakdown --}}

Profit by Year

@forelse($years as $row) @php $rowPositive = (float) $row['profit'] >= 0; @endphp @empty @endforelse @if($years->isNotEmpty()) @endif
Year Revenue Voucher Cost Expenses Net Profit
{{ $row['year'] }}@if($row['year'] == $currentYear) (YTD)@endif {{ $fmt($row['revenue']) }} {{ $fmt($row['cogs']) }} {{ $fmt($row['expenses']) }} {{ $fmt($row['profit']) }}
No profit data available yet.
Overall {{ $fmt($years->sum('revenue')) }} {{ $fmt($years->sum('cogs')) }} {{ $fmt($years->sum('expenses')) }} {{ $fmt($overall) }}
@endsection