@extends('layouts.app') @section('content') @php // Bezpieczna detekcja kolumn (żeby widok nie wywracał się w trakcie wdrażania migracji) $hasCanCol = \Illuminate\Support\Facades\Schema::hasColumn('proforma', 'can_be_editable'); $hasDelCol = \Illuminate\Support\Facades\Schema::hasColumn('proforma', 'usunieto'); $isDeleted = $hasDelCol ? (bool)($proforma->usunieto ?? false) : false; $isLocked = $hasCanCol ? !((bool)($proforma->can_be_editable ?? true)) : false; $editDisabled = $isDeleted || $isLocked; // disabled, jeśli usunięta lub zablokowana @endphp
Pro forma #{{ $proforma->id_faktura }} · {{ $proforma->p_2_numer }} · {{ $proforma->p_1_data_wystawienia }}
| # | Nazwa | j.m. | Ilość | Cena NETTO | Cena BRUTTO | NETTO (P_11) | VAT | BRUTTO | Stawka |
|---|---|---|---|---|---|---|---|---|---|
| {{ $i+1 }} | {{ $w->p_7_nazwa }} | {{ $w->p_8a_jednostka }} | {{ rtrim(rtrim(number_format($w->p_8b_ilosc, 8, ',', ' '), '0'), ',') }} | {{ $w->p_9a_cena_netto !== null ? number_format($w->p_9a_cena_netto, 2, ',', ' ') : '—' }} | {{ $w->p_9b_cena_brutto !== null ? number_format($w->p_9b_cena_brutto, 2, ',', ' ') : '—' }} | {{ number_format($w->p_11_wart_netto, 2, ',', ' ') }} | {{ number_format($w->p_11_vat, 2, ',', ' ') }} | {{ number_format($w->p_11a_wart_brutto, 2, ',', ' ') }} | {{ $w->p_12_stawka }} |
| Brak pozycji. | |||||||||
| Suma | {{ number_format($sumNet, 2, ',', ' ') }} | {{ number_format($sumVat, 2, ',', ' ') }} | {{ number_format($sumBr, 2, ',', ' ') }} | ||||||