{{ __('Dane Firmy') }}

{{-- Basic company info --}}
← Powrót Edytuj
@csrf
Wystaw fakturę

Dane Firmy:

Nazwa firmy: {{ $attributes[36] ?? '–' }}
Imię: {{ $company->acc_cl_name ?? '–' }}
Nazwisko: {{ $company->acc_cl_username ?? '–' }}
E-mail: {{ $attributes[3] ?? '–' }}
VAT: {{ $attributes[42] ?? '–' }}
Obsługiwany język: {{ $attributes[45] ?? '–' }}
Hasło: {{ $attributes[19] ?? '–' }}
{{ $users->firstWhere('user_id', $company->user_id)->name }}

Prywatna notatka:

@csrf @method('PUT')
{{-- Documents section --}}
@if(!empty($documentsByYear) && count($documentsByYear) > 0)

Przesłane dokumenty

@else

Brak przesłanych dokumentów

@endif @php $allPeriods = []; foreach ($documentsByYear as $year => $months) { foreach ($months as $month => $docs) { $allPeriods[] = $year . '-' . str_pad($month, 2, '0', STR_PAD_LEFT); } } foreach ($doneMonths as $done) { $allPeriods[] = $done; } $allPeriods = array_unique($allPeriods); usort($allPeriods, function ($a, $b) { [$yA, $mA] = explode('-', $a); [$yB, $mB] = explode('-', $b); return $yA === $yB ? $mB <=> $mA : $yB <=> $yA; }); $monthsPl = [ 1 => 'Styczeń', 2 => 'Luty', 3 => 'Marzec', 4 => 'Kwiecień', 5 => 'Maj', 6 => 'Czerwiec', 7 => 'Lipiec', 8 => 'Sierpień', 9 => 'Wrzesień', 10 => 'Październik', 11 => 'Listopad', 12 => 'Grudzień', ]; @endphp @php $currentYear = null; @endphp @foreach ($allPeriods as $period) @php [$year, $month] = explode('-', $period); $monthInt = (int) $month; $monthKey = str_pad($monthInt, 2, '0', STR_PAD_LEFT); $docsForMonth = $documentsByYear[$year][$monthKey] ?? []; $isDone = in_array($period, $doneMonths); $isClosed = in_array($period, $confirmedPeriodsArray); @endphp @if ($year !== $currentYear) @php $currentYear = $year; @endphp

{{ $year }}

@endif

{{ $monthsPl[$monthInt] ?? $monthInt }} {{-- Month buttons --}} @if($isDone)
@csrf
@else
@csrf
@endif @if($isClosed) @else
@csrf
@endif

{{-- Faktury przychodowe --}}
Faktury przychodowe @if(!empty($docsForMonth['przychodowe'])) @endif
@if(!empty($docsForMonth['przychodowe']))
    @foreach ($docsForMonth['przychodowe'] as $doc)
  • {{ $doc['name'] }} @if($doc['is_new']) (Nowy) @endif
    @csrf @method('DELETE')
    @if($doc['acc_doc_total_value'] !== null) {{ number_format($doc['acc_doc_total_value'],2) }} € @else
    @csrf
    @endif
  • @endforeach
@else

Brak plików

@endif
{{-- Faktury kosztowe --}}
Faktury kosztowe @if(!empty($docsForMonth['kosztowe'])) @endif
@if(!empty($docsForMonth['kosztowe']))
    @foreach ($docsForMonth['kosztowe'] as $doc)
  • {{ $doc['name'] }} @if($doc['is_new']) (Nowy) @endif
    @csrf @method('DELETE')
    @if($doc['acc_doc_total_value'] !== null) {{ number_format($doc['acc_doc_total_value'],2) }} € @else
    @csrf
    @endif
  • @endforeach
@else

Brak plików

@endif
{{-- Inne --}}
Inne @if(!empty($docsForMonth['inne'])) @endif
@if(!empty($docsForMonth['inne']))
    @foreach ($docsForMonth['inne'] as $doc)
  • {{ $doc['name'] }} @if($doc['is_new']) (Nowy) @endif
    @csrf @method('DELETE')
    @if($doc['acc_doc_total_value'] !== null) {{ number_format($doc['acc_doc_total_value'],2) }} € @else
    @csrf
    @endif
  • @endforeach
@else

Brak plików

@endif
@endforeach