@extends('layouts.app') @section('title', 'Fakturor') @section('content')

Fakturor

Hantera och spåra alla dina fakturor

Exportera Ny faktura
@foreach([ ['Totalt',$stats['total'],'#8B9AB8',''], ['Utkast',$stats['draft'],'#6B7280','badge-draft'], ['Skickade',$stats['sent'],'#93C5FD','badge-sent'], ['Förfallna',$stats['overdue'],'#FCA5A5','badge-overdue'], ['Betalda',$stats['paid'],'#6EE7B7','badge-paid'], ] as [$lbl,$val,$color,$badge])
{{ $val }}
{{ $lbl }}
@endforeach
@if(request()->hasAny(['search','status','from','to'])) Rensa filter @endif
@forelse($invoices as $invoice) @empty @endforelse
Faktura Kund Fakturadatum Förfallodatum Belopp Utestående Status Åtgärder
{{ $invoice->invoice_number }}
@if($invoice->type==='credit')
Kreditnota
@endif
{{ $invoice->customer->name }}
@if($invoice->your_reference)
Ref: {{ $invoice->your_reference }}
@endif
{{ $invoice->invoice_date->format('d.m.Y') }} {{ $invoice->due_date->format('d.m.Y') }} @if($invoice->due_date->isPast() && !in_array($invoice->status,['paid','cancelled']))
{{ $invoice->due_date->diffForHumans() }}
@endif
{{ number_format($invoice->total, 0, ',', ' ') }} {{ $invoice->currency }} @if($invoice->total_remaining > 0 && !in_array($invoice->status,['draft','cancelled'])) {{ number_format($invoice->total_remaining, 0, ',', ' ') }} kr @elseif($invoice->status==='paid') — @else — @endif {{ $invoice->status_label }}
@if($invoice->status==='draft') @endif
@if(request()->hasAny(['search','status','from','to'])) Inga fakturor matchar din sökning. Rensa filter @else Inga fakturor ännu.
Skapa din första faktura → @endif
@if($invoices->hasPages())
Visar {{ $invoices->firstItem() }}–{{ $invoices->lastItem() }} av {{ $invoices->total() }} fakturor
{{ $invoices->appends(request()->query())->links() }}
@endif
@endsection