@extends('layouts.portal') @section('title', 'Advanced Will Report') @section('page_title', 'Advanced Will Report') @section('page_subtitle', 'Complete Will Details with Versions and Payments') @section('sidebar') @include('admin.partials.sidebar', ['active' => 'reports-master']) @endsection @section('content')
Total Wills: {{ $willsData->count() }}
| Will ID | Client Name | Will Type | Status | Version | Created Date | Updated Date | Beneficiaries | Liabilities | Paid by Client | Payment Date | Payment Amount | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| #{{ $will['id'] }} | {{ $will['client_name'] }} | {{ $will['client_email'] }} | {{ ucfirst($will['will_type']) }} | @php $statusClass = match($will['status']) { 'completed' => 'bg-green-200 text-green-900', 'draft' => 'bg-yellow-200 text-yellow-900', 'pending_approval' => 'bg-orange-200 text-orange-900', default => 'bg-gray-200 text-gray-900' }; @endphp {{ ucfirst(str_replace('_', ' ', $will['status'])) }} | {{ $will['version'] }} | {{ $will['created_at'] }} | {{ $will['updated_at'] }} | {{ $will['beneficiaries_count'] }} | {{ $will['liabilities_count'] }} | @if($will['paid_by_client'] === 'Yes ✓') ✓ YES @else ✗ NO @endif | {{ $will['payment_date'] }} | {{ $will['payment_amount'] }} |
| No wills found | ||||||||||||
Total Wills
{{ $willsData->count() }}
Completed
{{ $willsData->where('status', 'completed')->count() }}
Total Beneficiaries
{{ $willsData->sum('beneficiaries_count') }}
Total Liabilities
{{ $willsData->sum('liabilities_count') }}
Paid Wills
{{ $willsData->filter(function($w) { return $w['paid_by_client'] === 'Yes ✓'; })->count() }}
Pending Payment
{{ $willsData->filter(function($w) { return $w['paid_by_client'] === 'No'; })->count() }}
📋 Will Info
📅 Dates
👥 Beneficiaries & Liab.
💳 Payment Status