@php $isStock = ($ledgerMode ?? 'stock') === 'stock'; @endphp
| Date | Particular | Voucher Type | Voucher Number | Sale / DR | Purchase / CR | Balance |
|---|---|---|---|---|---|---|
| {{ $row['date'] }} | {{ $row['particular'] }} | {{ $row['voucher_type'] }} | {{ $row['voucher_number'] }} | @if($row['sale_dr'] !== '') {{ $isStock ? $row['sale_dr'] : '₹ '.number_format((float) $row['sale_dr'], 2) }} @endif | @if($row['purchase_cr'] !== '') {{ $isStock ? $row['purchase_cr'] : '₹ '.number_format((float) $row['purchase_cr'], 2) }} @endif | @if($isStock) {{ $row['balance'] }} @else @php $bal = (float) $row['balance']; @endphp @if($bal < 0)(₹ {{ number_format(abs($bal), 2) }})@else₹ {{ number_format($bal, 2) }}@endif @endif |
| Totals on page | {{ $isStock ? ($totals['sale_dr'] ?? 0) : '₹ '.number_format($totals['sale_dr'] ?? 0, 2) }} | {{ $isStock ? ($totals['purchase_cr'] ?? 0) : '₹ '.number_format($totals['purchase_cr'] ?? 0, 2) }} | @if($isStock) {{ $totals['balance'] ?? 0 }} @else ₹ {{ number_format($totals['balance'] ?? 0, 2) }} @endif | |||
| Total | {{ $isStock ? ($totals['sale_dr'] ?? 0) : '₹ '.number_format($totals['sale_dr'] ?? 0, 2) }} | {{ $isStock ? ($totals['purchase_cr'] ?? 0) : '₹ '.number_format($totals['purchase_cr'] ?? 0, 2) }} | {{ $isStock ? ($totals['balance'] ?? 0) : '₹ '.number_format($totals['balance'] ?? 0, 2) }} | |||