@extends('layouts.app', ['title' => 'Eingangsrechnungen | Export']) @section('content') {{-- ── Modal: Kreditor zuweisen ────────────────────────────────────── --}} {{-- ── Modal: BU-Schlüssel ─────────────────────────────────────────── --}} {{-- ── Modal: Konto zuweisen (Rechnung) ───────────────────────────── --}} {{-- ── Modal: Kreditor-Konto (Lieferant) ──────────────────────────── --}} {{-- ── Modal: PDF Vollbild ─────────────────────────────────────────── --}} {{-- ══════════════════════════════════════════════════════════════════ --}}
{{-- ── Header ──────────────────────────────────────────────────── --}}
Zurück

Eingangsrechnungen Export

@if (session('msg')) @endif @if (session('error')) @endif @if (!empty($invoices)) {{-- ── Stats ───────────────────────────────────────────────── --}}
@php $stats = [ ['label' => 'Aktuell offen', 'count' => $invoices_all->whereIn('fk_invoice_status_id', ['1','2'])->count(), 'color' => 'info', 'route' => route('accounting.incoming-invoice.index')], ['label' => 'Neu', 'count' => $invoices_all->where('fk_invoice_status_id','1')->count(), 'color' => 'secondary', 'route' => route('accounting.incoming-invoice.status', ['id'=>1])], ['label' => 'In Bearbeitung','count' => $invoices_all->where('fk_invoice_status_id','2')->count(), 'color' => 'primary', 'route' => route('accounting.incoming-invoice.status', ['id'=>2])], ['label' => 'Bezahlt', 'count' => $invoices_all->where('fk_invoice_status_id','3')->count(), 'color' => 'success', 'route' => route('accounting.incoming-invoice.status', ['id'=>3])], ['label' => 'Abgelehnt', 'count' => $invoices_all->where('fk_invoice_status_id','4')->count(), 'color' => 'danger', 'route' => route('accounting.incoming-invoice.status', ['id'=>4])], ]; @endphp @foreach ($stats as $s) @endforeach
{{-- ── Suche + Filter ──────────────────────────────────────── --}}
{{-- Status-Checkboxen --}}
{{-- Zeitraum --}}
{{-- ── Export-Tabelle ──────────────────────────────────────── --}}
@csrf
@php $warnings = 0.0; @endphp @foreach ($invoices as $item) @endforeach
Betreff Betrag / Mahng. BU Kreditor / Lieferant Rech.-Nr. Rechnungsdatum Konto Kostenstelle Status Abteilung Exportiert
{{ $item->title }} @if ($item->get_warning->count() > 0) {{ number_format($item->total, 2, ',', '.') }} € / {{ number_format($item->total + $item->get_warning->sum('total'), 2, ',', '.') }} € @php $warnings += $item->get_warning->sum('total'); @endphp @else {{ number_format($item->total, 2, ',', '.') }} € @endif @if (!empty($item->get_bu_key)) {{ $item->get_bu_key->nr }} @else @endif @if (!empty($item->supplier->supplier_code)) {{ $item->supplier->supplier_code }}– @else @endif {{ $item->supplier->name }} {{ $item->invoice_nr }} {{ $item->invoice_date ? date('d.m.Y', strtotime($item->invoice_date)) : '—' }} @if ($item->fk_konto_id) {{ $item->konto->konto }} – {{ $item->konto->name }} @else @endif @if (!empty($item->get_cost_center)) {{ $item->get_cost_center->old_number ?? $item->get_cost_center->number }} – {{ $item->get_cost_center->name }} @endif @isset($item->get_status_in_company) {!! $item->get_status_in_company->name !!} @endisset {{ $item->get_current_department?->name }} @if ($item->is_exported) Ja @else Nein @endif
Summe
Netto: {{ number_format($invoices->sum('subtotal'), 2, ',', '.') }} €
MwSt.: {{ number_format($invoices->sum('tax'), 2, ',', '.') }} €
Brutto: {{ number_format($invoices->sum('total'), 2, ',', '.') }} €
@if ($warnings > 0)
Mahnungen: {{ number_format($warnings, 2, ',', '.') }} €
Gesamt: {{ number_format($invoices->sum('total') + $warnings, 2, ',', '.') }} €
@endif
@else

Keine Daten vorhanden.

@endif
@endsection