@include('documents.partials.style')
@include('documents.partials.letterhead', ['title' => $isBreeding ? 'Breeding Service Agreement' : 'Animal Sale Agreement', 'number' => $agreement->number])

This Agreement is made on {{ now()->format('d F Y') }} between {{ config('app.name') }} of {{ config('redbarn.address') }} (the “{{ $isBreeding ? 'Provider' : 'Seller' }}”) and {{ $agreement->customer->name }} (the “{{ $isBreeding ? 'Customer' : 'Buyer' }}”).

1. Parties

{{ $isBreeding ? 'Provider' : 'Seller' }}
Name{{ config('app.name') }}
Address{{ config('redbarn.address') }}
Email{{ config('redbarn.email') }}
{{ $isBreeding ? 'Customer' : 'Buyer' }}
Name{{ $agreement->customer->name }}
Phone{{ $agreement->customer->phone }}
Email{{ $agreement->customer->email ?? '—' }}
Location{{ $agreement->customer->location ?? '—' }}
ID No.{{ $agreement->customer->id_number ?? '—' }}

2. {{ $isBreeding ? 'Service' : 'Animal' }} details

@if($animal) @endif @foreach($details as [$label, $value]) @endforeach
Reference{{ $animal->reference }}
Name{{ $animal->name }}
Species / Breed{{ $animal->speciesRef->name ?? '—' }} / {{ $animal->breedRef->name ?? 'n/a' }}
Sex{{ ucfirst(strtolower($animal->sex)) }}
Date of birth{{ $animal->date_of_birth?->format('d M Y') ?? '—' }}
{{ $label }}{{ $value }}

3. Terms and conditions

@foreach($clauses as $index => $clause)

3.{{ $index + 1 }}  {{ $clause }}

@endforeach

4. Execution

By signing below, or by confirming this Agreement electronically, the parties accept the terms set out above.

For {{ config('app.name') }} ({{ $isBreeding ? 'Provider' : 'Seller' }})
Signature & Date
{{ $isBreeding ? 'Customer' : 'Buyer' }}
Signature & Date
@include('documents.partials.footer')