{{-- Body of the invoice page (#2957 slice 6d, card #3020). Included by invoice/show only. Expects: $invoice, $creditInvoice (the credit invoice of a credited invoice, else null), $payments (loaded once by invoice/show). Customer and invoice facts side by side, the invoice lines as a data table (Rad, Beskrivning, Antal, Pris, Totalt, numbers right-aligned) with VAT and total, then the payments. Same fields as the old view. --}} @php $money = fn ($value) => formatNumber($value, 2, ','); $payments = $payments ?? $invoice->payments()->get(); $invoiceRows = \App\Support\TablePagination::rows($invoice->rows()->get(), 'invoiceRowsPage'); $paymentRows = \App\Support\TablePagination::rows($payments, 'paymentPage'); @endphp
| {{ __('invoice.show.row.line') }} | {{ __('invoice.nh.show.description') }} | {{ __('invoice.show.row.items') }} | {{ __('invoice.show.row.itemPrice') }} | {{ __('invoice.show.row.total') }} |
|---|---|---|---|---|
| {{ ($key + 1) * 10 }} | {{ $row['row_text'] }} | 1 | {{ $money($row['price']) }} | {{ $money($row['price']) }} |
{{ __('invoice.show.payment.noResult') }}
| {{ __('invoice.show.payment.time') }} | {{ __('invoice.show.payment.amount') }} |
|---|---|
| {{ \App\Support\DisplayDate::timestamp($payment->created_at) }} | {{ $money($payment['sum']) }} |
| {{ \App\Support\DisplayDate::timestamp($invoice->credit_time) }} ({{ __('invoice.credited') }}) | {{ $money($creditInvoice->totalWithVat(true)) }} |