@extends('layouts.finance') @section('title', 'Zakat Estimate') @section('subtitle', '2.5% annual obligation on net zakatable wealth') @section('content') @php $displayCurrency = 'PKR'; $fmt = fn($usd) => $metrics->moneyIn($usd, 'USD', $displayCurrency); $zakatableTotal = array_sum(array_values($zakatableComponents)); $deductibleTotal = array_sum(array_values($deductibles)); $netZakatable = $netZakatable ?? max(0.0, $zakatableTotal - $deductibleTotal); $componentLabels = array_keys($zakatableComponents); $componentValues = array_values($zakatableComponents); $palette = ['#6366f1','#10b981','#f59e0b','#06b6d4','#ec4899','#8b5cf6','#0d9488','#f97316']; $entries = $entries ?? collect(); $categories = $categories ?? []; $dateFilter = $dateFilter ?? ['active' => false, 'from' => null, 'to' => null, 'label' => null]; $dashboardRouteParams = ($dateFilter['active'] ?? false) ? ['from' => $dateFilter['from'], 'to' => $dateFilter['to']] : []; @endphp {{-- Back link --}}
@include('dashboard.cards._date-filter', ['dateFilter' => $dateFilter, 'filterRoute' => 'dashboard.cards.zakat']) {{-- Nisab status banner --}} @if($isAboveNisab)| Label | Category | Grams | Price/unit | Amount | Cur. | USD eq. | PKR eq. | Actions |
|---|---|---|---|---|---|---|---|---|
| {{ $entry->label }} | {{ $categories[$entry->category] ?? $entry->category }} | {{ $entry->grams !== null ? number_format((float) $entry->grams, 3) : '—' }} | {{ $entry->price_per_unit !== null ? number_format((float) $entry->price_per_unit, 2) : '—' }} | {{ number_format((float) $entry->amount, 2) }} | {{ $entry->currency }} | {{ $isDeduction ? '-' : '' }}{{ $metrics->money($entryUsd) }} | {{ $isDeduction ? '-' : '' }}{{ $fmt($entryUsd) }} |
| Component | Type | USD Value | PKR Equivalent | % of Zakatable |
|---|---|---|---|---|
| {{ $label }} | Asset | {{ $metrics->money($usdVal) }} | {{ $fmt($usdVal) }} | {{ $zakatableTotal > 0 ? number_format(($usdVal / $zakatableTotal) * 100, 1) : '0.0' }}% |
| {{ $label }} | Deduction | -{{ $metrics->money($usdVal) }} | -{{ $fmt($usdVal) }} | — |
| Net Zakatable Wealth | {{ $metrics->money($netZakatable) }} | {{ $fmt($netZakatable) }} | — | |