@include('user.layouts.head') {{-- my own styles --}}
@php if (!function_exists('formatDateString')) { function formatDateString($text) { try { $timestamp = strtotime($text); if ($timestamp !== false) { // Format as MM-DD-YYYY return date('m-d-Y', $timestamp); } // Not a valid date, return original return $text; } catch (Exception $e) { // Fallback return $text; } } } if (!function_exists('formatIfNumber')) { function formatIfNumber($value) { // Check for null, empty string if ($value === null || $value === '') { return '0'; } // Remove commas if any, then check if numeric $number = str_replace(',', '', $value); if (is_numeric($number)) { // Round to nearest integer and format with commas return number_format(round($number), 0, '.', ','); } // If not a number, return original return $value; } } $building_suite = ""; $floor_arrow = ""; if (!empty($property->no_of_parking)) { for ($i = $property->no_of_parking; $i > 0; $i--) { $building_suite .= "
P${i}
"; } } if (!empty($property->no_of_basement)) { for ($i = $property->no_of_basement; $i > 0; $i--) { $building_suite .= "
B${i}
"; } } $floor_count = 1; $total_rentable_sf = 0; $total_rentable_count = 0; $total_vacent_sf = 0; $total_vacent_count = 0; $total_occupied_sf = 0; $total_occupied_count = 0; $total_income = 0; $total_vacent_sf_percentage = 0; $total_occupied_sf_percentage = 0; $average_rent_per_sf = 0; $avg_rent = []; if (!empty($property->floors)) { foreach ($property->floors as $floor) { $total_floor_rentable_sf = 0; $total_floor_vacent_sf = 0; $total_floor_occupied_sf = 0; if ($floor->floor_type == 'Parking') { $building_suite .= "
PARKING
"; } else { $suite_template = ""; if (!empty($property->suites)) { foreach ($property->suites as $suite) { if ($suite->floor_id == $floor->id) { $status = 'vacant'; if ($suite->lease_status == 'Expiring Soon') { $status = 'occupied'; } else if ($suite->lease_status == 'Available') { $status = 'vacant'; } else if ($suite->lease_status == 'Booked') { $status = 'common'; } else if ($suite->lease_status == 'Occupied') { $status = 'occupied'; } $total_floor_rentable_sf += (int) $suite->total_rentable_sf; $total_rentable_count += 1; if ($status === 'available' || $status == 'vacant') { $total_floor_vacent_sf += (int) $suite->total_rentable_sf; $total_vacent_count += 1; } else { $total_floor_occupied_sf += (int) $suite->total_rentable_sf; $total_occupied_count += 1; } if (!empty($suite->annual_base_rent)) { $total_income += (int) $suite->annual_base_rent; array_push($avg_rent, (int) $suite->rate_per_sf); } $suite_template .= '
Suite ' . $suite->suite_no . ' ' . $suite->tenant_name . '
' . formatIfNumber($suite->total_rentable_sf) . ' sf | ' . (!empty($suite->lease_exp_date) ? ('Ex on: ' . formatDateString($suite->lease_exp_date)) : 'N/A') . '
'; } } } $building_suite .= '
' . $suite_template . '
'; $floor_arrow .= '

' . $floor->floor_number . '

' . formatIfNumber($total_floor_rentable_sf) . ' sf

' . formatIfNumber($total_floor_vacent_sf) . ' Vacant sf

'; $total_rentable_sf += $total_floor_rentable_sf; $total_vacent_sf += $total_floor_vacent_sf; $total_occupied_sf += $total_floor_occupied_sf; } } } if (!empty($total_rentable_count) && !empty($total_vacent_count) && !empty($total_occupied_count)) { $total_vacent_sf_percentage = ($total_vacent_count / $total_rentable_count) * 100; $total_occupied_sf_percentage = ($total_occupied_count / $total_rentable_count) * 100; } if (!empty($avg_rent)) { $average_rent_per_sf = array_sum($avg_rent) / count($avg_rent); } @endphp

{{ $property->name ?? "Property Name" }}

@if(!empty($property->image)) @endif

Location

{{ !empty($property->city) ? $property->city : '-' }}, {{ !empty($property->state) ? $property->state : '-' }}

Total sf

{{ formatIfNumber($total_rentable_sf) }} sf

Vacant sf

{{ formatIfNumber($total_vacent_sf_percentage) }}% | {{ formatIfNumber($total_vacent_sf) }} sf

Occupancy

{{ formatIfNumber($total_occupied_sf_percentage) }}% | {{ formatIfNumber($total_occupied_sf) }} sf

Floors

{{ !empty($property->no_of_floors) ? $property->no_of_floors : '-' }}

Total Income

$ {{ formatIfNumber($total_income) }}

Average Rent per sf

$ {{ formatIfNumber($average_rent_per_sf) }}

Expirations < 12 Months

{{ !empty($property->no_of_expired_lease) ? $property->no_of_expired_lease : '0' }}

{!! $building_suite !!}
{!! $floor_arrow !!}

Property ABC

Floor Number

0

Total Rentable SF per Floor

0 sf

Total Vacant Rentable SF per Floor

0 sf

Floor Plan

Property ABC

Floor No.

N/A

Suite No

602

Current Lease Status

Available

Tenant Name

John

Lease Start Date

16/05/2025

Lease End Date

16/05/2035

Renewal

Renewal Date

Rent per SF

$30000

Space Status

-

Number of Tours Conducted

- / -

Asking Rent per SF

$ 0

Total Annual Rent

$ 0

Lease Signed

Yes

Suite Images

@include('user.layouts.foot')