@extends('layouts.finance')
@section('title', 'Net Worth Detail')
@section('subtitle', 'Full breakdown of assets and liabilities')
@section('content')
@php
$displayCurrency = 'PKR';
$fmt = fn($usd) => $metrics->moneyIn($usd, 'USD', $displayCurrency);
$palette = ['#6366f1','#10b981','#f59e0b','#06b6d4','#ec4899','#ef4444','#8b5cf6','#0d9488'];
$netWorth = $kpis['net_worth'];
$assetLabels = array_keys($components);
$assetValues = array_values($components);
$liabLabels = array_keys($liabilities);
$liabValues = array_values($liabilities);
$totalAssets = array_sum($assetValues);
$totalLiab = array_sum($liabValues);
@endphp
{{-- Back link --}}
{{-- Hero KPI Row --}}
Net Worth
{{ $fmt($netWorth) }}
Assets minus liabilities
Total Assets
{{ $fmt($totalAssets) }}
{{ count($components) }} asset categories
Total Liabilities
{{ $fmt($totalLiab) }}
{{ count($liabilities) }} liability categories
Zakat Estimate
{{ $fmt($kpis['zakat']) }}
2.5% of net worth
{{-- Charts + Breakdown --}}
{{-- Asset Donut --}}
{{-- Liability Donut --}}
Liability Breakdown
PKR eq.
@if($totalLiab > 0)
@else
No liabilities recorded.
@endif
{{-- 6-month trend --}}
Revenue vs. Expenses — 6 Months
USD
{{-- Line-item table --}}
Net Worth Components
| Component |
Type |
USD Value |
PKR Equivalent |
@foreach($components as $label => $usdVal)
| {{ $label }} |
Asset |
{{ $metrics->money($usdVal) }} |
{{ $fmt($usdVal) }} |
@endforeach
@foreach($liabilities as $label => $usdVal)
| {{ $label }} |
Liability |
-{{ $metrics->money($usdVal) }} |
-{{ $fmt($usdVal) }} |
@endforeach
| Net Worth |
{{ $metrics->money($netWorth) }} |
{{ $fmt($netWorth) }} |
{{-- Insights --}}
Insights
Debt-to-Asset Ratio
{{ $totalAssets > 0 ? number_format(($totalLiab / $totalAssets) * 100, 1) : '0.0' }}%
Lower is healthier
Liquid (Bank + Transit)
{{ $fmt($kpis['bank_total'] + $kpis['transit']) }}
Immediately accessible
Illiquid Assets
{{ $fmt($kpis['inventory']) }}
Inventory
@push('scripts')
@endpush
@endsection