@extends('layouts.app') @php use App\Models\Permission; use App\Support\AgeingBucket; use App\Support\Format; $canSeeMoney = auth()->user()->hasPermission(Permission::TENANCY_VIEW_FINANCIALS); $bucket = $tenancy->ageing_bucket; @endphp @section('title', $tenancy->outlet) @section('heading', $tenancy->outlet) @section('subheading', ($tenancy->region?->code ? $tenancy->region->code.' · ' : '').($tenancy->location ?: 'No unit recorded')) @section('actions') Back to list @can(Permission::PROPOSAL_CREATE) @unless ($tenancy->trashed()) Evaluate a proposal @endunless @endcan @can(Permission::TENANCY_UPDATE) Edit @endcan @can(Permission::TENANCY_DELETE) @unless ($tenancy->trashed())
@csrf @method('DELETE')
@endunless @endcan @endsection @section('content')
{{-- -------------------------------------------------------- --}} {{-- Ageing banner --}} {{-- -------------------------------------------------------- --}}
Ageing position
{{ AgeingBucket::label($bucket, AgeingBucket::MODE_BAND) }}
Expiry date
{{ $tenancy->display_expiry }}
{{ Format::countdown($tenancy->days_to_expiry, 'Date to be confirmed') }}
Status
{{ $tenancy->status_label }}
@if ($tenancy->renewal_stage_label)
{{ $tenancy->renewal_stage_label }}
@endif
@if ($tenancy->trashed())
Archived {{ $tenancy->deleted_at->format('d M Y') }} @can(Permission::TENANCY_RESTORE)
@csrf
@endcan
@endif
{{-- -------------------------------------------------------- --}} {{-- Tenancy details --}} {{-- -------------------------------------------------------- --}}
Tenancy details
Running no.
{{ $tenancy->seq_no ?? '—' }}
Category
{{ $tenancy->category?->name ?? '—' }}
Region
{{ $tenancy->region ? $tenancy->region->code.' — '.$tenancy->region->name : '—' }}
Outlet
{{ $tenancy->outlet }}
Unit / location
{{ $tenancy->location ?? '—' }}
Area
{{ $tenancy->area_sqft ? number_format((float) $tenancy->area_sqft, 2).' sq ft' : '—' }}
Commencing
{{ $tenancy->display_commencement }}
Expiring
{{ $tenancy->display_expiry }}
Term
{{ $tenancy->term ?? '—' }}
Renewal notice
{{ $tenancy->renewal_notice ?? '—' }}
Notice sent
{{ Format::date($tenancy->renewal_notice_sent_on) }}
{{-- -------------------------------------------------------- --}} {{-- Landlord --}} {{-- -------------------------------------------------------- --}}
Landlord
@if ($tenancy->landlord)
Name
{{ $tenancy->landlord->name }}
Registration
{{ $tenancy->landlord->registration_no ?? '—' }}
Contact
{{ $tenancy->landlord->contact_person ?? '—' }}
Phone
@if ($tenancy->landlord->contact_phone) {{ $tenancy->landlord->contact_phone }} @else — @endif
Email
@if ($tenancy->landlord->contact_email) {{ $tenancy->landlord->contact_email }} @else — @endif
Address
{{ $tenancy->landlord->address ?? '—' }}
@else

No landlord recorded for this tenancy.

@endif
{{-- -------------------------------------------------------- --}} {{-- Money --}} {{-- -------------------------------------------------------- --}} @if ($canSeeMoney)
Rent and charges (RM)
ItemRate / sq ftMonthly total
Base rent — year 1 {{ Format::rate($tenancy->base_rent_yr1_rate) }} @money($tenancy->base_rent_yr1_total)
Base rent — year 2 {{ Format::rate($tenancy->base_rent_yr2_rate) }} @money($tenancy->base_rent_yr2_total)
Base rent — year 3 {{ Format::rate($tenancy->base_rent_yr3_rate) }} @money($tenancy->base_rent_yr3_total)
Service charges {{ Format::rate($tenancy->service_charge_rate) }} @money($tenancy->service_charge_total)
Promotion charges {{ Format::rate($tenancy->promotion_charge_rate) }} @money($tenancy->promotion_charge_total)
Gross rent @money($tenancy->gross_rent)
Tax {{ $tenancy->tax_rate ? '('.Format::percent($tenancy->tax_rate).')' : '' }} @money($tenancy->tax_amount)
Total payable @money($tenancy->total_rent)
Turnover rent (GTO) {{ Format::percent($tenancy->gto_percent) }}
Late payment interest {{ Format::percent($tenancy->late_payment_interest) }}
Refundable deposits (RM)
Security@money($tenancy->deposit_security)
Fit-out@money($tenancy->deposit_fitout)
Restoration@money($tenancy->deposit_restoration)
Utility@money($tenancy->deposit_utility)
Mail box@money($tenancy->deposit_mailbox)
Others@money($tenancy->deposit_others)
Total deposit @money($tenancy->deposit_total)
@endif {{-- -------------------------------------------------------- --}} {{-- Remarks --}} {{-- -------------------------------------------------------- --}}
Renewal update & remarks
Renewal update (email dated)

{{ $tenancy->renewal_remarks ?: '—' }}

General remarks

{{ $tenancy->remarks ?: '—' }}

{{-- -------------------------------------------------------- --}} {{-- Other terms for this outlet --}} {{-- -------------------------------------------------------- --}}
Other terms recorded for this outlet
@if ($relatedTerms->isEmpty())
No other terms on file.
@else
@foreach ($relatedTerms as $term) @endforeach
UnitCommencingExpiryStatus
{{ $term->location ?: '(no unit)' }} @if ($term->trashed()) archived @endif {{ $term->display_commencement }} {{ $term->display_expiry }} {{ $term->status_label }}
@endif
{{-- -------------------------------------------------------- --}} {{-- Audit trail --}} {{-- -------------------------------------------------------- --}}
Change history
@if ($history->isEmpty())
No changes recorded since this record was created @if ($tenancy->creator) by {{ $tenancy->creator->name }} @endif on {{ $tenancy->created_at->format('d M Y H:i') }}.
@else
@foreach ($history as $entry) @endforeach
WhenWhoActionDetails
{{ $entry->created_at->format('d M Y H:i') }} {{ $entry->user?->name ?? 'System' }} {{ $entry->action }} {{ $entry->description }} @if ($entry->changes)
{{ \Illuminate\Support\Str::limit(collect($entry->changes)->keys()->implode(', '), 120) }}
@endif
@endif
@endsection