@extends('layouts/layoutMaster') @section('title', 'Rental Agreement - Equipment Renting System') @section('content')
Rental Agreement #{{ $agreement->agreement_number }}
@php $statusColors = [ 'pending' => 'warning', 'signed' => 'info', 'equipment_handed_over' => 'success', ]; $color = $statusColors[$agreement->status] ?? 'secondary'; @endphp {{ ucfirst(str_replace('_', ' ', $agreement->status)) }}
Rental Information

Rental Date: {{ $agreement->rental->rental_date->format('Y-m-d H:i') }}

Expected Return: {{ $agreement->rental->expected_return_date ? $agreement->rental->expected_return_date->format('Y-m-d H:i') : 'N/A' }}

Total Amount: Rs. {{ number_format($agreement->rental->grand_total, 2) }}

Customer Information

Name: {{ $agreement->rental->customer?->name ?? 'Walk-in Customer' }}

@if($agreement->rental->customer?->phone)

Phone: {{ $agreement->rental->customer->phone }}

@endif @if($agreement->rental->customer?->address)

Address: {{ $agreement->rental->customer->address }}

@endif
@if($agreement->status === 'pending')
@csrf
@endif @if($agreement->status === 'signed')
@csrf
@endif @if($agreement->status === 'equipment_handed_over') @php $invoice = $agreement->rental->invoices()->first(); @endphp @if($invoice) View Invoice @else Generate Invoice @endif @endif
@endsection