@extends('layouts.app') @section('title', $contract->contract_number) @section('content')

{{ $contract->contract_number }}

{{ $contract->title }}

Print Edit @if (! in_array($contract->status, ['terminated', 'cancelled'], true))
@csrf
@endif @if ($contract->status !== 'active')
@csrf
@endif @if (! in_array($contract->status, ['terminated', 'cancelled'], true))
@csrf
@endif
@include('components.kpi', ['label' => 'Monthly value', 'value' => money($contract->monthly_value), 'variant' => 'info']) @include('components.kpi', ['label' => 'Contract value', 'value' => money($contract->monthly_value * $contract->term_months)]) @include('components.kpi', [ 'label' => 'Days remaining', 'value' => $daysLeft === null ? '—' : (string) $daysLeft, 'variant' => $daysLeft !== null && $daysLeft < 0 ? 'bad' : ($daysLeft !== null && $daysLeft < 60 ? 'warn' : 'good'), ]) @include('components.kpi', ['label' => 'Status', 'value' => title_case_words($contract->status)])

Agreement

Customer
@if ($contract->customer) {{ $contract->customer->display_name }} @else — @endif
Service
@if ($contract->service) {{ $contract->service->service_number }} — {{ $contract->service->plan?->name }} @else — @endif
Type
{{ title_case_words($contract->type) }}
Status
{{ title_case_words($contract->status) }}
Term
{{ $contract->term_months }} month(s)
Period
{{ $contract->starts_on?->format('d M Y') }} — {{ $contract->ends_on?->format('d M Y') }}
Notice period
{{ $contract->notice_period_days }} day(s)
Auto-renew
{{ $contract->auto_renew ? 'Yes' : 'No' }}
Signed
{{ $contract->signed_at?->format('d M Y H:i') ?: 'Not signed' }}
@if ($contract->file_path)
Document
{{ $contract->file_path }}
@endif

Terms

@if ($contract->terms)
{{ $contract->terms }}
@else @include('components.empty-state', ['icon' => '📜', 'title' => 'No terms recorded', 'message' => 'Add the agreed service levels and termination conditions.']) @endif
@csrf @method('DELETE')
@endsection