{{-- This is a reusable partial for displaying a cumulative financial summary. It expects a variable named $cumulativeData to be passed to it. --}} @if(!empty($cumulativeData)) @php // Generate a unique ID for the collapse element to avoid conflicts. $snapshotId = 'snapshot-' . \Illuminate\Support\Str::random(8); @endphp
{{-- The card-header is now a clickable link to toggle the collapse --}}
Cumulative Financial Snapshot {{-- Add an icon to indicate it's collapsible --}}
{{-- This div is the collapsible content. The "show" class makes it visible by default. --}}
Metric Value
Statement From @if($cumulativeData['startDate']) {{ $cumulativeData['startDate'] }} @else N/A @endif
Statement To @if($cumulativeData['endDate']) {{ $cumulativeData['endDate'] }} @else N/A @endif
Average Balance ₹ {{ number_format($cumulativeData['avgBalance'], 2) }}
Adjusted Average Balance ₹ {{ number_format($cumulativeData['adjustedAvgBalance'], 2) }}
No. of EMI Bounces {{ $cumulativeData['noOfEmiBounces'] }}
Inward Cheque Bounces {{ $cumulativeData['inwardChequeBounce'] }}
Outward Cheque Bounces {{ $cumulativeData['outwardChequeBounce'] }}
Average Monthly EMI ₹ {{ number_format($cumulativeData['avgMonthlyEmi'], 2) }}
Speculative Trade Count {{ $cumulativeData['speculativeTradeCount'] }}
Speculative Trade Amount ₹ {{ number_format($cumulativeData['speculativeTradeAmount'], 2) }}
@endif