{{-- the statement's table (slice 4ج: split out of ledger/_statement so the screen and the printable copy print the SAME columns from the SAME rows of App\Ledger\Statement). the balance-after columns only when $withBalance; the panel's «سند» column only when $forSeller, which the printable copy never sets. slice 11 (پ۱۱-۱, measured at 375): on the SCREEN ($stack) a narrow phone shows every row as a card, each cell with its column's name (data-label, the same words as the head), so nobody swipes sideways to read his own account; the explicit table roles keep the rows and cells announced as such once the CSS lays them out as blocks. the printable copy never stacks: it is laid out for paper. --}} @php $stack ??= false; // the explicit table role of one element, only when stacked (a fixed word, never input) $role = fn (string $name): string => $stack ? ' role="' . $name . '"' : ''; $labels = ['date' => 'تاریخ', 'text' => 'شرح', 'rial' => 'اثر ریالی', 'metal' => 'اثر فلز', 'rial_after' => 'ماندهٔ ریال پس از ردیف', 'metal_after' => 'ماندهٔ همان فلز پس از ردیف', 'entry' => 'سند']; @endphp
| {{ $labels['date'] }} | {{ $labels['text'] }} | {{ $labels['rial'] }} | {{-- slice 5د۱ (decision 89): one metal column; each cell names its metal (طلای ۷۵۰ · نقرهٔ ۹۹۹) --}}{{ $labels['metal'] }} | @if ($withBalance){{ $labels['rial_after'] }} | {{ $labels['metal_after'] }} | @endif @if ($forSeller){{ $labels['entry'] }} | @endif
|---|---|---|---|---|---|---|
| {{ $row['text'] }}@if ($row['reference'] !== null) — مرجع {{ $row['reference'] }}@endif | {{ $row['rial'] }} | {{ $row['metal'] }} | @if ($withBalance){{ $row['rial_after'] }} | {{ $row['metal_after'] ?? '—' }} | @endif @if ($forSeller)@endif |