{{-- 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 {{-- slice 5د۱ (decision 89): one metal column; each cell names its metal (طلای ۷۵۰ · نقرهٔ ۹۹۹) --}} @if ($withBalance) @endif @if ($forSeller) @endif @foreach ($rows as $row) {{-- each value sits in ONE span: as a stacked card the cell is a two-column grid (name · value), and loose text beside a would become two grid items --}} @if ($withBalance) @endif @if ($forSeller) @endif @endforeach
{{ $labels['date'] }} {{ $labels['text'] }} {{ $labels['rial'] }}{{ $labels['metal'] }}{{ $labels['rial_after'] }} {{ $labels['metal_after'] }}{{ $labels['entry'] }}
{{ $row['text'] }}@if ($row['reference'] !== null) — مرجع {{ $row['reference'] }}@endif {{ $row['rial'] }} {{ $row['metal'] }}{{ $row['rial_after'] }} {{ $row['metal_after'] ?? '—' }}سند {{ \App\Support\Digits::toPersian((string) $row['id']) }}@if ($row['void_url'])ابطال@endif