@php use App\Models\Crm\Agreement; $statusColors = \App\Livewire\Crm\Agreements\Show::STATUS_COLORS; $control = 'mt-1 block w-full rounded-xl border-slate-300 text-sm shadow-sm focus:border-indigo-500 focus:ring-indigo-500'; $tz = config('app.display_timezone'); @endphp
{{ __('Agreements') }} {{ __(Agreement::STATUSES[$agreement->status] ?? $agreement->status) }} @if ($canEdit) {{ __('Edit') }} @endif @if ($canEdit && $agreement->status === 'draft') {{ __('Mark in negotiation') }} @elseif ($canEdit && $agreement->status === 'in_negotiation') {{ __('Back to draft') }} @endif @if ($drafting && $isDirector) {{ __('Record signing') }} @endif @if ($inForce && $isDirector) {{ __('Terminate') }} @endif @if ($canRenew) {{ __('Start renewal') }} @endif @if ($drafting && ! $isDirector)

{{ __('Officers draft and negotiate. A director records the signing once the terms are agreed.') }}

@endif @if ($daysLeft !== null)

{{ trans_choice('{0} Ends today.|{1} Ends tomorrow.|[2,*] Ends in :count days, on :date.', $daysLeft, ['count' => number_format($daysLeft), 'date' => $agreement->ends_on->format('j M Y')]) }} @if ($agreement->auto_renews) {{ __('It renews itself unless notice is given.') }} @endif

{{ __('60-day reminder: :sixty. 30-day reminder: :thirty.', [ 'sixty' => $agreement->reminder_60_sent_at ? __('sent :date', ['date' => $agreement->reminder_60_sent_at->timezone($tz)->format('j M Y')]) : __('not yet'), 'thirty' => $agreement->reminder_30_sent_at ? __('sent :date', ['date' => $agreement->reminder_30_sent_at->timezone($tz)->format('j M Y')]) : __('not yet'), ]) }} @if ($agreement->renewal) {{ __('A renewal has been started.') }} @endif

@endif

{{ __('Terms') }}

{{ __('Starts') }}
{{ $agreement->starts_on?->format('j M Y') ?? __('Not set') }}
{{ __('Ends') }}
{{ $agreement->ends_on?->format('j M Y') ?? __('Open-ended') }}
{{ __('Signed') }}
{{ $agreement->signed_on?->format('j M Y') ?? __('Not yet') }}
{{ __('Reference') }}
{{ $agreement->reference ?: __('None') }}
{{ __('Signed for us by') }}
{{ $agreement->our_signatory ?: __('Not yet') }}
{{ __('Signed for them by') }}
{{ $agreement->counterparty_signatory ?: __('Not yet') }}
{{ __('Summary') }}
{{ $agreement->summary ?: __('No summary written.') }}

{{ __('An agreement records terms. It is never revenue: business under it is counted on its quotes, invoices and jobs.') }}

{{ __('Parties') }}

@if ($agreement->partnership)
{{ __('Partnership') }}
{{ $agreement->partnership->name }}
@endif
{{ __('Organisation') }}
@if ($agreement->customer) {{ $agreement->customer->name }} @else {{ __('Not linked') }} @endif
{{ __('Looked after by') }}
{{ $agreement->owner?->name ?? __('Not available') }}

{{ __('History') }}

{{ __('Each renewal is its own agreement; earlier terms are kept') }}

    @foreach ($history as $link) @endforeach
@if ($notes->isNotEmpty())

{{ __('Notes') }}

    @foreach ($notes as $note)
  • {{ $note->body }}
  • @endforeach
@endif
@if ($canEdit) {{ __('Edit agreement') }} @include('livewire.crm.agreements.partials.form') {{ __('Cancel') }} {{ __('Save') }} {{ __('Saving…') }} @endif @if ($drafting && $isDirector) {{ __('Record signing') }}

{{ __('From here the terms are fixed. Renewal reminders go to the person looking after it at 60 and 30 days before it ends.') }}

{{ __('Cancel') }} {{ __('Record signing') }} {{ __('Saving…') }}
@endif @if ($inForce && $isDirector) {{ __('Terminate agreement') }} {{ __('Cancel') }} {{ __('Terminate') }} @endif @if ($canRenew) {{ __('Start renewal') }}

{{ __('A renewal is a new draft agreement carrying the same parties. This one stays exactly as it is, and is marked Renewed when a director signs the new one.') }}

{{ __('Cancel') }} {{ __('Start renewal') }} {{ __('Saving…') }}
@endif