@php $totalSources = $equity['total'] + $liabs['total']; @endphp
{{-- Assets --}}
| Account | Group | Amount (₹) |
@foreach($assets['rows'] as $row)
| {{ $row['account'] }} |
{{ $row['group'] }} |
₹ {{ number_format($row['value'],2) }} |
@endforeach
| Total Assets | ₹ {{ number_format($assets['total'],2) }} |
{{-- Liabilities + Equity --}}
@foreach($equity['rows'] as $row)
| {{ $row['account'] }} |
₹ {{ number_format($row['value'],2) }} |
@endforeach
@foreach($liabs['rows'] as $row)
| {{ $row['account'] }} {{ $row['group'] }} |
₹ {{ number_format($row['value'],2) }} |
@endforeach
| Total Equity + Liabilities | ₹ {{ number_format($totalSources,2) }} |
{{-- Balance check --}}
{{ abs($assets['total'] - $totalSources) < 1 ? '✓ Balance Sheet is balanced.' : '⚠ Balance Sheet is NOT balanced. Difference: ₹'.number_format(abs($assets['total'] - $totalSources),2) }}