@extends('layouts.app') @section('title', $project->name) @section('back', route('projects.index')) @section('content') @php $profit = $financials['profit_total']; $margin = $financials['margin_percentage']; $budgetUsed = $financials['budget_used_percentage']; $pc = $profit < 0 ? 'text-red-500' : 'text-emerald-600'; $badgeClass = match ($project->status) { 'On Track' => 'g', 'At Risk' => 'r', 'Completed' => 's', 'On Hold' => 'v', default => 'a', }; $barClass = match ($project->status) { 'At Risk' => 'bg-red-400', 'Completed' => 'bg-slate-400', 'On Hold' => 'bg-violet-400', default => 'bg-blue-500', }; @endphp
Client: {{ $project->client?->company_name ?? 'TBD' }} · Due: {{ $project->due_date?->format('M Y') ?? 'TBD' }}
Invoices: {{ \App\Support\Format::mwk($financials['invoice_total']) }} total · {{ \App\Support\Format::mwk($financials['paid_invoice_total']) }} paid · {{ \App\Support\Format::mwk($financials['outstanding_invoice_total']) }} outstanding
Contract value
{{ \App\Support\Format::mwk($project->contract_value) }}
Budget
{{ \App\Support\Format::mwk($project->budget) }}
Amount spent
{{ \App\Support\Format::mwk($financials['spent_total']) }}
Income
{{ \App\Support\Format::mwk($financials['income_total'], true) }}
Profit / Loss
{{ \App\Support\Format::mwk($profit, true) }}
Margin
{{ ($margin >= 0 ? '+' : '') . $margin }}%
Overall progress
{{ $project->progress_percentage }}%Invoice status
Project team
@forelse($team as $emp){{ $emp->name }}
{{ $emp->job_title }}
No team members assigned
@endforelseRecent transactions
All in finance{{ $t->description }}
{{ $t->transaction_date?->format('M j') }}
No recent transactions
@endforelseInvoices
View all{{ $i->invoice_number }}
{{ $i->invoice_date?->format('M j') }}
{{ \App\Support\Format::mwk($i->total_amount) }}
{{ $i->status }}No invoices yet — create from invoices
@endforelseEdit project