@extends('layouts/contentLayoutMaster') @section('title', 'Rental Agreement') @section('vendor-style') @endsection @section('page-style') @endsection @section('content')
{{--

Add Dispatch Point

--}}

# {{$agreement->code}}

@if ($message = Session::get('success'))
@endif @if ($errorMessage = Session::get('errorMessage'))
@endif
@php $badgeMap = [ 'plant' => ['label' => 'Plant', 'color' => '#db4243'], 'building' => ['label' => 'Plant Building', 'color' => '#e08465'], 'plant_mcc' => ['label' => 'Plant Collection Point', 'color' => '#eb7aa0'], 'ao' => ['label' => 'Area Office', 'color' => '#28A745'], 'dp' => ['label' => 'Dispatch Point', 'color' => '#20C997'], 'mcc' => ['label' => 'Collection Center', 'color' => '#007bff'], 'ao_building' => ['label' => 'Area Office Building', 'color' => '#008080'], ]; $type = $agreement->type ?? 'unknown'; $badge = $badgeMap[$type] ?? null; @endphp
Status: @if ($agreement->status === 1) @if ($agr_status === 1) Active @else Ended @endif @elseif ($agreement->status === 2) Pending @elseif ($agreement->status === 4) Reverted @else Rejected @endif
Vendor Code: {{ $agreement->vendor ? $agreement->vendor->code : 'N/A' }}
Vendor Name: {{ $agreement->vendor ? ucwords($agreement->vendor->name) : 'N/A' }}
Facility: {{ $agreement->facility ? ucwords($agreement->facility->name) : 'N/A' }}
Facility Type: @if ($badge) {{ $badge['label'] }} @else N/A @endif
Agreement Type: {{ $agreement->agreement_type ? Str::headline($agreement->agreement_type) : 'N/A' }}
Agreement Amount: {{ $agreement->agreement_amount ?? 'N/A' }}
W.E.F Date: {{ $agreement->wef_date ?? 'N/A' }}
End Date: {{ $agreement->end_date ?? 'N/A' }}
Payment Type: {{ $agreement->payment_type ? Str::headline($agreement->payment_type) : 'N/A' }}
No of Installments: {{ $agreement->installments ?? 'N/A' }}
Per Installment Amount: {{ $agreement->per_installment_amount ?? 'N/A' }}
Pending Rental Amount: {{ $pending_rent_amount ?? 'N/A' }}
Advance Amount: {{ $agreement->advance_amount ?? 'N/A' }}
Security Amount: {{ $agreement->security_amount ?? 'N/A' }}
Created By: {{ $agreement->createdBy ? ucwords($agreement->createdBy->name) : 'N/A' }}
Created At: {{ \Carbon\Carbon::parse($agreement->created_at)->format('Y-m-d') }}
@if(isset($agreement->file_url) && $agreement->file_url != null)
Attachment File:
@endif
@endsection @section('vendor-script') @endsection