@extends('layouts.app') @section('title', $building->name . ' - GSI Mobilier') @section('page-title', $building->name) @section('page-description', 'Détails du bâtiment') @section('content')
Retour à la liste
Modifier
@csrf @method('DELETE')

{{ $building->name }}

@if($building->type) {{ $building->type }} @endif {{ $building->total_units }} unités {{ $building->tenants->where('status', 'active')->count() }} locataires

Revenus Mensuels

{{ number_format($building->tenants->where('status', 'active')->sum('monthly_rent'), 0, ',', ' ') }}

FCFA / mois

Dépenses Totales

{{ number_format($building->expenses->sum('amount'), 0, ',', ' ') }}

FCFA

Bénéfice Net

@php $revenue = $building->tenants->where('status', 'active')->sum('monthly_rent'); $expenses = $building->expenses->sum('amount'); $profit = $revenue - $expenses; @endphp

{{ number_format($profit, 0, ',', ' ') }}

FCFA

Informations Générales

Adresse

{{ $building->address }}

Unités

{{ $building->total_units }}

Taux

@php $occupationRate = $building->total_units > 0 ? round(($building->tenants->where('status', 'active')->count() / $building->total_units) * 100) : 0; @endphp

{{ $occupationRate }}%

@if($building->description)

Description

{{ $building->description }}

@endif

Locataires ({{ $building->tenants->count() }})

Ajouter
@forelse($building->tenants as $tenant) @empty @endforelse
Nom Unité Loyer Caution Statut Actions
{{ strtoupper(substr($tenant->name, 0, 1)) }}

{{ $tenant->name }}

{{ $tenant->phone }}

@if($tenant->unit_number) {{ $tenant->unit_number }} @else - @endif

{{ number_format($tenant->monthly_rent, 0, ',', ' ') }}

FCFA

@if($tenant->deposit_paid) Payée @else Non payée @endif @if($tenant->status === 'active') Actif @else Inactif @endif Voir

Aucun locataire pour ce bâtiment

Dépenses ({{ $building->expenses->count() }})

Ajouter
@forelse($building->expenses as $expense) @empty @endforelse
Date Catégorie Description Montant
{{ $expense->expense_date->format('d/m/Y') }} {{ $expense->category }} {{ $expense->description }}

{{ number_format($expense->amount, 0, ',', ' ') }}

FCFA

Aucune dépense pour ce bâtiment

@endsection