@extends('platform.layout') @section('title', 'Dashboard') @section('content')

Dashboard

{{ now()->format('l, d F Y') }}

{{-- Your money --}}
Your income this month
{{ formatCurrency($income['this_month']) }}
{{ $income['payments_this_month'] }} {{ $income['payments_this_month'] == 1 ? 'payment' : 'payments' }} · {{ now()->format('F') }}
Last month
{{ formatCurrency($income['last_month']) }}
{{ now()->subMonthNoOverflow()->format('F') }}
This year
{{ formatCurrency($income['this_year']) }}
Expected per month: {{ formatCurrency($income['expected_monthly']) }}
Pending approval
{{ formatCurrency($pending['amount']) }}
{{ $pending['count'] ? $pending['count'] . ' ' . ($pending['count'] == 1 ? 'proof' : 'proofs') . ' to review →' : 'Nothing waiting' }}
{{-- Shops at a glance --}}
@foreach([ ['Shops', $shops['total'], 'bi-shop', 'text-dark', 'all'], ['Working', $shops['working'], 'bi-check-circle', 'text-success', 'all'], ['Due within ' . config('tenancy.warn_days_before') . ' days', $shops['due_soon'], 'bi-hourglass-split', $shops['due_soon'] ? 'text-warning' : 'text-muted', 'attention'], ['Overdue / blocked', $shops['overdue'], 'bi-exclamation-octagon', $shops['overdue'] ? 'text-danger' : 'text-muted', 'attention'], ['Suspended', $shops['suspended'], 'bi-pause-circle', 'text-muted', 'suspended'], ] as [$label, $value, $icon, $class, $filter])
{{ $label }}
{{ $value }}
@endforeach
@if($smsOut->isNotEmpty())

SMS ran out this month

@foreach($smsOut as $row)
{{ $row->tenant->name }} · {{ number_format($row->used) }}{{ $row->limit !== null ? ' of ' . number_format($row->limit) : '' }} sent{{ $row->blocked ? ' · ' . number_format($row->blocked) . ' not sent' : '' }} Add SMS
@endforeach
@endif
{{-- Who needs to pay --}}
{{-- Latest money in --}}

Latest payments

Income by shop
@forelse($recentPayments as $payment)
{{ $payment->tenant->name ?? '—' }}
{{ $payment->paid_on->format('d M Y') }} · {{ $payment->months }} {{ $payment->months == 1 ? 'month' : 'months' }}{{ $payment->method ? ' · ' . $payment->method : '' }}
{{ formatCurrency($payment->amount) }}
@empty

No payments recorded yet.

@endforelse
@endsection