@extends('layouts.app') @section('title', $invoice->invoice_number) @section('content') @php $invoice->load(['rows','customer','payments']); @endphp

{{ $invoice->invoice_number }}

{{ $invoice->status_label }} @if($invoice->type==='credit')KREDITNOTA@endif
{{ $invoice->customer->name }} · {{ $invoice->invoice_date->format('d.m.Y') }}
📄 PDF @if(in_array($invoice->status,['sent','viewed','partially_paid','overdue']))
@csrf
@endif @if($invoice->status==='draft') Redigera
@csrf
@endif @if(!in_array($invoice->status,['draft','cancelled','credited']))
@csrf
@endif
@csrf
Fakturarader
@foreach($invoice->rows as $row) @if($row->type==='heading') @elseif($row->type==='text') @else @endif @endforeach
Beskrivning Antal À-pris Moms Summa
{{ $row->description }}
{{ $row->description }}
{{ $row->description }}
@if($row->article_number)
{{ $row->article_number }}
@endif
{{ rtrim(rtrim(number_format($row->quantity,3),'0'),'.') }} {{ $row->unit }} {{ number_format($row->unit_price,2,',', ' ') }} {{ intval($row->vat_rate) }}% {{ number_format($row->gross_amount,2,',', ' ') }} kr
Exkl. moms{{ number_format($invoice->subtotal,2,',', ' ') }} kr
Total moms{{ number_format($invoice->vat_amount,2,',', ' ') }} kr
@if($invoice->total_paid>0)
Betalt-{{ number_format($invoice->total_paid,2,',', ' ') }} kr
@endif
{{ $invoice->total_remaining>0?'Kvar att betala':'Totalt' }} {{ number_format(max($invoice->total_remaining,$invoice->total),2,',', ' ') }} kr
@if($invoice->payments->count())
Betalningshistorik
@foreach($invoice->payments as $payment)
{{ number_format($payment->amount,2,',', ' ') }} kr
{{ $payment->payment_date->format('d.m.Y') }} · {{ $payment->method }}
✓ Registrerad
@endforeach
@endif
Info
@foreach([['Kund',$invoice->customer->name],['Fakturadatum',$invoice->invoice_date->format('d.m.Y')],['Förfallodatum',$invoice->due_date->format('d.m.Y')],['OCR',$invoice->ocr_number],['Bankgiro',$invoice->bankgiro_number],['VÄr ref.',$invoice->our_reference],['Er ref.',$invoice->your_reference],['Valuta',$invoice->currency]] as [$l,$v]) @if($v)
{{ $l }}{{ $v }}
@endif @endforeach @if($invoice->notes)
{{ $invoice->notes }}
@endif
KundlÀnk
{{ route('public.invoice.view',$invoice) }}
@if(!$invoice->stripe_payment_url)
@csrf
@else @endif
@endsection