{{-- resources/views/faktury/index.blade.php --}} @extends('layouts.app') @section('content')
| # | Numer (P_2) | Data (P_1) | Rodzaj | Waluta | Netto | VAT | Brutto (P_15) | Pozycje | Płatności | Status | Akcje |
|---|---|---|---|---|---|---|---|---|---|---|---|
| {{ $f->id_faktura }} | {{ $f->p_2_numer }} | {{ \Illuminate\Support\Carbon::parse($f->p_1_data_wystawienia)->format('Y-m-d') }} | {{ $f->rodzaj_faktury }} | {{ $f->kod_waluty }} | {{ $f->suma_netto !== null ? number_format($f->suma_netto, 2, ',', ' ') : '—' }} | {{ $f->suma_vat !== null ? number_format($f->suma_vat, 2, ',', ' ') : '—' }} | {{ $f->p_15_brutto !== null ? number_format($f->p_15_brutto, 2, ',', ' ') : '—' }} | {{ $f->pozycje_count ?? 0 }} | {{ $f->platnosci_count ?? 0 }} | @php // Bezpieczne rzutowanie na bool (gdy aliasy z DB::raw albo PG) $isLocked = !((bool)($f->can_be_editable ?? true)); $isDeleted = (bool)($f->usunieto ?? false); $editDisabled = $isLocked || $isDeleted; @endphp {{-- STATUS --}}{{ $statusBadge['label'] }} | {{-- AKCJE --}}|
| Brak faktur. Utwórz pierwszą → | |||||||||||