@extends('layout') @section('content')

Instalment #{{ $agreement->id }}

Back
Customer: {{ optional($agreement->customer)->name ?? $agreement->customer_name }}
Product: {{ optional($agreement->product)->name ?? '—' }}
Total: {{ $currency }}{{ number_format($agreement->total_amount, 2) }}
Down Payment: {{ $currency }}{{ number_format($agreement->down_payment, 2) }}
Instalments: {{ $agreement->instalments_count }} × {{ $currency }}{{ number_format($agreement->instalment_amount, 2) }}
Start Date: {{ $agreement->start_date }}
Status: {{ $agreement->status }}

Payments

@foreach($agreement->payments as $p) @endforeach
# Due Date Amount Status Actions
{{ $p->id }} {{ $p->due_date }} {{ $currency }}{{ number_format($p->amount, 2) }} @if($p->status === 'paid') Paid @else Pending @endif @if($p->status !== 'paid')
@csrf
@endif
Edit Agreement View Invoice
@endsection