@extends('layouts.app') @php use App\Models\TenancySummary; $saved = $summary->exists; $columns = TenancySummary::defaultColumnLabels(); $variance = TenancySummary::VARIANCE_COLUMN; $value = fn (string $field, $fallback = null) => old($field, $summary->{$field} ?? $fallback); $dateValue = fn (string $field) => old($field, $summary->{$field}?->format('Y-m-d')); $label = fn (string $column) => old('column_labels.'.$column, $summary->columnLabel($column)); $monthly = fn (string $row, string $column, string $field = 'amount') => old("monthly.{$row}.{$column}.{$field}", $summary->monthly($row, $column, $field)); $deposit = fn (string $row, string $column) => old("deposits.{$row}.{$column}", $summary->deposit($row, $column)); $expense = fn (string $row, string $column) => old("expenses.{$row}.{$column}", $summary->expense($row, $column)); $tick = fn (string $item) => (bool) old('submissions.'.$item.'.submitted', $summary->submitted($item)); $tickDate = fn (string $item) => old('submissions.'.$item.'.date', $summary->submittedOn($item)); @endphp @section('title', 'Tenancy summary — '.$proposal->outlet) @section('heading', 'Tenancy Summary / Report (TSF)') @section('subheading', 'DOC/TNC/2 · Rev 0 · Eff date 1 Aug 2017 — for '.$proposal->outlet) @section('actions') @if ($saved) Print for signing PDF @endif Blank form Cancel @endsection @section('content') @if ($errors->any())
Please check the {{ $errors->count() }} highlighted {{ \Illuminate\Support\Str::plural('entry', $errors->count()) }} below.
@endif @unless ($saved)
Filled in from the accepted proposal — the premises, the term, the rent year by year and the deposits. Every field is editable: change anything the agreement settled differently, then save.
@endunless
@csrf @method('PUT')
{{-- ---------------------------------------------------- --}} {{-- Head of the form: what this submission is --}} {{-- ---------------------------------------------------- --}}
Submission
Tick one only.
@foreach (TenancySummary::typeOptions() as $key => $text)
@endforeach
@error('nature_of_change')
{{ $message }}
@enderror

{{-- The checklist down the right of the printed form --}}
Submitted
@foreach (TenancySummary::submissionItems() as $item => $text) @endforeach
ItemSubmissionDate
{{ $text }}
{{-- ---------------------------------------------------- --}} {{-- Premises and term --}} {{-- ---------------------------------------------------- --}}
Premises and term
From the proposal: {{ $proposal->outlet }}
@error('showroom')
{{ $message }}
@enderror
From the proposal: {{ $proposal->landlord?->name ?: 'not set' }}
@error('area_estimated_sqft')
{{ $message }}
@enderror
@error('area_actual_sqft')
{{ $message }}
@enderror
@error('expiry_date')
{{ $message }}
@enderror
{{-- ---------------------------------------------------- --}} {{-- Monthly payment --}} {{-- ---------------------------------------------------- --}}
Monthly payment %
The column headings are as typed on the sheet — rename them if the term is split differently. Totals are worked out as you type.
@foreach ($columns as $column => $default) @endforeach @foreach ($columns as $column => $default) @if ($column === $variance) @endif @endforeach @foreach (TenancySummary::monthlyInputRows() as $row => $text) @foreach ($columns as $column => $default) @if ($column === $variance) @endif @endforeach @endforeach {{-- Worked out from the rows above --}} @foreach ($columns as $column => $default) @if ($column === $variance) @endif @endforeach @foreach ($columns as $column => $default) @if ($column === $variance) @endif @endforeach @foreach ($columns as $column => $default) @if ($column === $variance) @endif @endforeach
Monthly payment
Per sq ft (RM)(%)
{{ $text }}
Total
{{ $value('tax_percent', TenancySummary::DEFAULT_TAX_PERCENT) }} % GST / SST
Total payment per month
@error('turnover_rent_percent')
{{ $message }}
@enderror
on gross sales turnover (base rent).
{{-- ---------------------------------------------------- --}} {{-- Deposits (refundable) --}} {{-- ---------------------------------------------------- --}}
Deposit (refundable)
@foreach ($columns as $column => $default) @endforeach @foreach (TenancySummary::depositInputRows() as $row => $text) @foreach ($columns as $column => $default) @endforeach @endforeach @foreach ($columns as $column => $default) @endforeach
Item{{ $label($column) }}
{{ $text }}
Total refundable
{{-- ---------------------------------------------------- --}} {{-- Non-refundable expenses --}} {{-- ---------------------------------------------------- --}}
Non-refundable expenses
@foreach ($columns as $column => $default) @endforeach @foreach (TenancySummary::expenseInputRows() as $row => $text) @foreach ($columns as $column => $default) @endforeach @endforeach @foreach ($columns as $column => $default) @endforeach @foreach ($columns as $column => $default) @endforeach
Item{{ $label($column) }}
{{ $text }}
Total non-refundable
Total payable
{{-- ---------------------------------------------------- --}} {{-- Remarks and notes --}} {{-- ---------------------------------------------------- --}}
Remarks
{{-- ---------------------------------------------------- --}} {{-- Sign-off --}} {{-- ---------------------------------------------------- --}}
Sign-off
Cancel
@endsection @push('scripts') @endpush