{{-- resources/views/documents/show.blade.php --}} @extends('layouts.app') @section('title', $document->document_type . ($document->document_number ? ' №' . $document->document_number : '')) @php $leftFields = [ ['label' => 'Тип документа', 'value' => $document->document_type], ['label' => 'Номер документа', 'value' => $document->document_number], ['label' => 'Дата документа', 'value' => $document->document_date ? $document->document_date->format('d.m.Y') : null], ['label' => 'Наименование суда', 'value' => $document->court_name], ['label' => 'Территориальная подсудность', 'value' => $document->territorial_jurisdiction], ['label' => 'Номер дела', 'value' => $document->case ? $document->case->case_number : null], ['label' => 'Дата подачи заявления в суд', 'value' => $document->filing_date ? $document->filing_date->format('d.m.Y') : null], ['label' => 'Дата вынесения решения', 'value' => $document->decision_date ? $document->decision_date->format('d.m.Y') : null], ['label' => 'Дата вступления в силу', 'value' => $document->effective_date ? $document->effective_date->format('d.m.Y') : null], ['label' => 'Направление', 'value' => $document->direction], ['label' => 'Автор/Составитель', 'value' => $document->author], ['label' => 'Статус документа', 'value' => $document->status], ]; $rightFields = [ ['label' => 'Сумма основного долга', 'value' => $document->debt_amount > 0 ? number_format($document->debt_amount, 2, ',', ' ') . ' ₽' : null, 'class' => 'text-danger fw-bold'], ['label' => 'Начало периода долга', 'value' => $document->debt_period_start ? $document->debt_period_start->format('d.m.Y') : null], ['label' => 'Конец периода долга', 'value' => $document->debt_period_end ? $document->debt_period_end->format('d.m.Y') : null], ['label' => 'Сумма пеней', 'value' => $document->penalty_amount > 0 ? number_format($document->penalty_amount, 2, ',', ' ') . ' ₽' : null, 'class' => 'text-warning fw-bold'], ['label' => 'Начало периода пеней', 'value' => $document->penalty_period_start ? $document->penalty_period_start->format('d.m.Y') : null], ['label' => 'Конец периода пеней', 'value' => $document->penalty_period_end ? $document->penalty_period_end->format('d.m.Y') : null], ['label' => 'Судебные издержки', 'value' => $document->court_costs > 0 ? number_format($document->court_costs, 2, ',', ' ') . ' ₽' : null, 'class' => 'text-info fw-bold'], ]; @endphp @section('content')

Основная информация

@foreach($leftFields as $field) @endforeach
{{ $field['label'] }} {{ $field['value'] ?? '-' }}

Суммы

@foreach($rightFields as $field) @endforeach
{{ $field['label'] }} {{ $field['value'] ?? '-' }}
@if($document->total_amount > 0)
ИТОГО ПО ДОКУМЕНТУ
{{ number_format($document->total_amount, 2, ',', ' ') }} ₽
@endif

Отправитель / Получатель

Отправитель
@if($document->senderOrganization) {{ $document->senderOrganization->short_name ?? $document->senderOrganization->name }} @if($document->senderOrganization->inn)
ИНН: {{ $document->senderOrganization->inn }}
@endif @elseif($document->sender_custom) {{ $document->sender_custom }} @else Не указан @endif
Получатель
@if($document->recipientOrganization) {{ $document->recipientOrganization->short_name ?? $document->recipientOrganization->name }} @if($document->recipientOrganization->inn)
ИНН: {{ $document->recipientOrganization->inn }}
@endif @elseif($document->recipient_custom) {{ $document->recipient_custom }} @else Не указан @endif
Направление
@if($document->direction === 'incoming') Входящий @elseif($document->direction === 'outgoing') Исходящий @elseif($document->direction === 'internal') Внутренний @else Не указано @endif
@if($document->description)

Описание документа

{{ $document->description }}
@endif

Скан документа

@if($document->scan_file)
{{ $document->scan_file }}
Открыть документ @else

Ссылка на скан не указана

@endif

Служебная информация

Создан: {{ $document->created_at->format('d.m.Y H:i') }}
Обновлен: {{ $document->updated_at->format('d.m.Y H:i') }}
@endsection