@extends('layouts.app') @php use App\Support\AgeingBucket; use App\Support\Format; $editing = $proposal->exists; $action = $editing ? route('proposals.update', $proposal) : route('proposals.store'); $value = fn (string $field, $fallback = null) => old($field, $proposal->{$field} ?? $fallback); $dateValue = fn (string $field) => old($field, $proposal->{$field}?->format('Y-m-d')); /* | Amounts are shown grouped to two decimals — 15,000.00. A number input | will not hold a separator, so these fields are text with a decimal | keypad; the separators come off again in the browser on submit and in | LeaseProposalRequest for anything posted without JavaScript. */ $amount = fn (string $field) => amount_value($value($field)); @endphp @section('title', $editing ? 'Edit proposal evaluation' : 'Evaluate a lease proposal') @section('heading', $editing ? 'Lease proposal — '.$proposal->outlet : 'Evaluation of a lease proposal') @section('subheading', 'Tenancy term, rental rate, percentage rent, deposits, renewal capping, location and landlord details') @section('actions') Cancel @endsection @section('content') @if ($errors->any())
Please check the {{ $errors->count() }} highlighted {{ \Illuminate\Support\Str::plural('entry', $errors->count()) }} below.
@endif
@csrf @if ($editing) @method('PUT') @endif
{{-- ---------------------------------------------------- --}} {{-- The proposal itself --}} {{-- ---------------------------------------------------- --}}
The proposal
@error('reference_no')
{{ $message }}
@enderror
@error('proposal_type')
{{ $message }}
@enderror
@php /* | Each tenancy carries its expiry date and the ageing colour it sits | in, so the picker shows at a glance which records have lapsed and | which are still some way off. The note underneath repeats it for | the chosen one, since a browser may not paint option colours. */ $pickedTenancyId = (int) $value('tenancy_id'); $pickedTenancy = $options['tenancies']->firstWhere('id', $pickedTenancyId); $pickedBucket = $pickedTenancy?->ageing_bucket ?? AgeingBucket::TBC; @endphp
{{ AgeingBucket::shortLabel($pickedBucket) }} Expires {{ $pickedTenancy?->display_expiry }} {{ $pickedTenancy ? Format::countdown($pickedTenancy->days_to_expiry, '') : '' }} {{ $pickedTenancy ? '· '.$pickedTenancy->status_label : '' }}
Linking a record keeps the proposal beside the tenancy it replaces, and lets the rent be compared with what is paid today. Red has already expired, amber expires within three months, and the cooler colours are further out.
@error('tenancy_id')
{{ $message }}
@enderror
@error('proposal_date')
{{ $message }}
@enderror
@error('received_on')
{{ $message }}
@enderror
@error('status')
{{ $message }}
@enderror
{{-- ---------------------------------------------------- --}} {{-- Location --}} {{-- ---------------------------------------------------- --}}
Location
@error('region_id')
{{ $message }}
@enderror
@error('tenancy_category_id')
{{ $message }}
@enderror
@error('outlet')
{{ $message }}
@enderror
@error('location')
{{ $message }}
@enderror
@error('floor_level')
{{ $message }}
@enderror
Drives every monthly total: rate per sq ft × this area.
@error('area_sqft')
{{ $message }}
@enderror
{{-- ---------------------------------------------------- --}} {{-- Landlord info --}} {{-- ---------------------------------------------------- --}}
Landlord
@error('landlord_id')
{{ $message }}
@enderror
Used only when none is picked above.
@error('landlord_name')
{{ $message }}
@enderror
@error('landlord_registration_no')
{{ $message }}
@enderror
@error('landlord_contact_person')
{{ $message }}
@enderror
@error('landlord_contact_phone')
{{ $message }}
@enderror
@error('landlord_contact_email')
{{ $message }}
@enderror
@error('landlord_address')
{{ $message }}
@enderror
{{-- ---------------------------------------------------- --}} {{-- Tenancy term --}} {{-- ---------------------------------------------------- --}}
Tenancy term
@error('term_months')
{{ $message }}
@enderror
@error('term')
{{ $message }}
@enderror
@error('commencement_date')
{{ $message }}
@enderror
@error('expiry_date')
{{ $message }}
@enderror
@error('rent_free_months')
{{ $message }}
@enderror
@error('fitout_period_months')
{{ $message }}
@enderror
@error('renewal_option_months')
{{ $message }}
@enderror
@error('renewal_notice_months')
{{ $message }}
@enderror
{{-- ---------------------------------------------------- --}} {{-- Rental rate --}} {{-- ---------------------------------------------------- --}}
Rental rate (RM)
@error('rent_basis')
{{ $message }}
@enderror
The benchmark the proposal is measured against.
@error('current_total_rent')
{{ $message }}
@enderror
@foreach (\App\Models\LeaseProposal::RENT_COMPONENTS as $prefix => $label) @endforeach
Item Rate / sq ft Monthly total
{{ $label }}
Each monthly total is the rate per sq ft times the lettable area, worked out as you type. Leave the lettable area blank to type the monthly figures yourself, as for a lump sum.
{{-- ---------------------------------------------------- --}} {{-- Percentage rent --}} {{-- ---------------------------------------------------- --}}
Percentage rent
@error('percentage_rent_basis')
{{ $message }}
@enderror
@error('percentage_rent_percent')
{{ $message }}
@enderror
Monthly sales above which it applies.
@error('percentage_rent_threshold')
{{ $message }}
@enderror
{{-- ---------------------------------------------------- --}} {{-- Deposits --}} {{-- ---------------------------------------------------- --}}
Deposits, if any (RM)
@error('deposit_months')
{{ $message }}
@enderror
@foreach ([ 'deposit_security' => 'Security', 'deposit_fitout' => 'Fit-out', 'deposit_restoration' => 'Restoration', 'deposit_utility' => 'Utility', 'deposit_mailbox' => 'Mail box', 'deposit_others' => 'Others', ] as $field => $label)
@endforeach

Total deposit RM 0.00
Added up automatically from the six boxes above.
{{-- ---------------------------------------------------- --}} {{-- Renewal capping --}} {{-- ---------------------------------------------------- --}}
Renewal capping
The most the rent may rise at renewal.
@error('renewal_capping_percent')
{{ $message }}
@enderror
@error('renewal_capping_basis')
{{ $message }}
@enderror
@error('renewal_capping_amount')
{{ $message }}
@enderror
{{-- ---------------------------------------------------- --}} {{-- Evaluation --}} {{-- ---------------------------------------------------- --}}
Evaluation
@error('recommendation')
{{ $message }}
@enderror
Left blank, today's date is used once a decision is recorded.
@error('evaluated_on')
{{ $message }}
@enderror
Cancel
@endsection