@extends('layouts.app') @section('title', 'Contracts') @section('content')

Contracts

{{ $contracts->total() }} agreement(s) matching your filters.

+ New contract
@include('components.kpi', ['label' => 'Contracted MRR', 'value' => money($totals['contractedMrr']), 'variant' => 'info']) @include('components.kpi', ['label' => 'Active value', 'value' => money($totals['active']), 'variant' => 'good']) @include('components.kpi', ['label' => 'Expiring in 60 days', 'value' => (string) $totals['expiring'], 'variant' => $totals['expiring'] ? 'warn' : '']) @include('components.kpi', ['label' => 'Drafts', 'value' => (string) $totals['draft']])
@if ($contracts->isEmpty()) @include('components.empty-state', [ 'icon' => '📜', 'title' => 'No contracts found', 'message' => 'Record a customer agreement to track term, notice period and contracted revenue.', ]) @else @foreach ($contracts as $contract) @endforeach
ContractCustomerTypeService Monthly valueTermEndsStatus
{{ $contract->contract_number }}
{{ \Illuminate\Support\Str::limit($contract->title, 42) }}
{{ $contract->customer?->display_name ?: '—' }} {{ title_case_words($contract->type) }} {{ $contract->service?->service_number ?: '—' }} {{ money($contract->monthly_value) }} {{ $contract->term_months }} mo @if ($contract->auto_renew)auto@endif {{ $contract->ends_on?->format('d M Y') ?: '—' }} {{ title_case_words($contract->status) }} Open
@endif
@if ($contracts->hasPages())
{{ $contracts->links('partials.pagination') }}
@endif
@endsection