@extends('mainlayout.layout') @section('title', config('app.name') . ' | Revenue') @section('content')
Revenue overview

Revenue

Revenue from completed plot purchases.

{{ $periodLabel }}
@if($errors->any())@endif

From 1 January through today.

Compare the selected month with the same month last year.

@if(request()->filled('per_page'))@endif Reset
Revenue earnedTZS {{ number_format($metrics['revenue'], 2) }}
Completed order valueTZS {{ number_format($metrics['order_value'], 2) }}
Completed plots · {{ number_format($metrics['orders']) }} orders{{ number_format($metrics['plots']) }}
Average revenue per orderTZS {{ number_format($metrics['average_revenue'], 2) }}
@if($comparison)

@if($comparison['change'] !== null) {{ $comparison['change'] > 0 ? '+' : '' }}{{ number_format($comparison['change'], 1) }}% {{ $comparison['kind'] }} compared with {{ $comparison['label'] }} (TZS {{ number_format($comparison['revenue'], 2) }}). @else {{ $comparison['label'] }} had no revenue to compare with. @endif {{ $comparison['note'] }}

@endif

Revenue trend{{ $filters['period'] === 'yoy' ? ' · year over year' : '' }}

{{ $trend['label'] }} · monthly revenue and completed orders

View monthly figures
@if(isset($trend['previous_revenue']))@endif @foreach($trend['labels'] as $index => $label)@if(isset($trend['previous_revenue']))@endif@endforeach
Monthly revenue and completed orders for {{ $trend['label'] }}
MonthRevenue (TZS)Same month last year (TZS)Completed orders
{{ $label }}{{ number_format($trend['revenue'][$index], 2) }}{{ number_format($trend['previous_revenue'][$index], 2) }}{{ $trend['previous_labels'][$index] }}{{ number_format($trend['orders'][$index]) }}

Leading projects

Contribution to {{ strtolower($periodLabel) }}

@forelse($topProjects as $project) @php($share = (float) $metrics['revenue'] > 0 ? round((float) $project->revenue / (float) $metrics['revenue'] * 100, 1) : 0)
{{ $project->name }}{{ number_format($share, 1) }}%
{{ number_format($project->orders) }} orders · TZS {{ number_format($project->revenue, 2) }}
@empty

No project revenue yet

Completed orders will appear here.

@endforelse
@if($largestPurchase)

Largest completed purchase

{{ $largestPurchase->property_name }} · Plot {{ $largestPurchase->plot_number ?: '—' }} · Order {{ $largestPurchase->order_reference }}

TZS {{ number_format($largestPurchase->order_value, 2) }} order value, earning TZS {{ number_format($largestPurchase->revenue_amount, 2) }}.

@endif

Completed plot purchases

{{ number_format($sales->total()) }} completed orders · {{ $periodLabel }}

@if($metrics['estimated_dates'])

{{ number_format($metrics['estimated_dates']) }} historical orders have estimated completion dates based on their last successful payment or order history.

@endif
@forelse($sales as $sale) @php($orderUrl = $sale->order && $sale->order->plot && $sale->order->property ? url('/property/orders/view/' . encrypt($sale->order_id)) : null) @empty @endforelse
Order / CustomerProject / PlotProperty ownerOrder value (TZS)Revenue (TZS)Completed
@if($orderUrl){{ $sale->order_reference }}@else{{ $sale->order_reference }}@endif {{ $sale->customer_name }} {{ $sale->property_name }}Plot {{ $sale->plot_number ?: '—' }}{{ $sale->property_owner_name }}{{ number_format($sale->order_value, 2) }}{{ number_format($sale->revenue_amount, 2) }}{{ $sale->completed_at->setTimezone($timezone)->format('d M Y, H:i') }}@if($sale->completion_date_estimated)Estimated date@endif

No completed purchases found

Try another month or clear the filters.

@include('partials.directory-pagination', ['paginator' => $sales])

Revenue is earned at order completion. Reporting dates use {{ $timezone }}.

@endsection @push('scripts') @endpush