@extends('layouts.app') @section('content') @php $isEdit = isset($mode) && $mode === 'edit'; $editable = ($faktura->can_be_editable ?? true) && !($faktura->usunieto ?? false); $action = $isEdit ? route('faktury.update.header', $faktura->id_faktura) : route('faktury.store.header'); $backRoute = $isEdit ? route('faktury.index') : route('faktury.index'); $submitLabel = $isEdit ? 'Zapisz zmiany i dalej' : 'Zapisz i przejdź dalej'; @endphp
{{-- Nagłówek strony --}}

{{ $isEdit ? 'Edycja faktury — Krok 1/5: Nagłówek' : 'Nowa faktura — Krok 1/5: Nagłówek' }}

{{ $isEdit ? 'Zmień podstawowe informacje o fakturze.' : 'Uzupełnij podstawowe informacje o fakturze.' }}

@if(isset($faktura))

Faktura #{{ $faktura->id_faktura ?? '—' }} @if(!empty($faktura->p_2_numer)) · {{ $faktura->p_2_numer }} @endif @if(!empty($faktura->p_1_data_wystawienia)) · {{ $faktura->p_1_data_wystawienia }} @endif

@endif
Lista faktur
{{-- Pasek postępu --}}
1. Nagłówek 2. Podmioty 3. Pozycje 4. Płatności 5. Podsumowanie
{{-- Komunikaty --}} @if (!$editable && $isEdit)
Ta faktura jest {{ $faktura->usunieto ? 'oznaczona jako usunięta' : 'zatwierdzona' }} — edycja zablokowana. Pola poniżej są tylko do podglądu.
@endif @if (session('success'))
{{ session('success') }}
@endif @if (session('info'))
{{ session('info') }}
@endif @if ($errors->any())
@endif {{-- Formularz --}}
@csrf @if($isEdit) @method('PATCH') @endif
Nagłówek faktury
Twój numer wewnętrzny. KSeF: /Fa/P_2
@error('p_2_numer')
{{ $message }}
@enderror
KSeF: /Fa/P_1
@error('p_1_data_wystawienia')
{{ $message }}
@enderror
ISO 4217, np. PLN, EUR. /Fa/KodWaluty
@error('kod_waluty')
{{ $message }}
@enderror
KSeF: /Fa/RodzajFaktury
@error('rodzaj_faktury')
{{ $message }}
@enderror
{{-- Przyciski --}}
Anuluj @if($editable) @else Podgląd podsumowania @endif
@endsection @push('styles') @endpush