{{ $company->clients()->createdIn('year', $year)->count() }}
{{ trans('dashboard.counter.clients') }}
{{ $company->policies()->createdIn('year', $year)->count() }}
{{ trans('dashboard.counter.policies') }}
{{ $company->currency_symbol }}{{ $company->policies()->createdIn('year', $year)->count() }}
{{ trans('dashboard.counter.sales') }}
{{ $company->currency_symbol }}{{ $company->payments()->madeWithin('year', $year)->sum('amount') + 0 }}
{{ trans('dashboard.counter.conversions') }}
{{ $company->currency_symbol }}{{ $company->payments()->madeWithin('year', $year)->sum('amount') - ($company->brokers->reduce(function($count, $broker) use($year) {
return $count + ($broker->inviteePayments()->madeWithin('year', $year)->sum('amount') * $broker->company->commission_rate / 100);
}, 0) + $company->staff->reduce(function($count, $staff) use($year) {
return $count + ($staff->inviteePayments()->madeWithin('year', $year)->sum('amount') * $staff->company->commission_rate / 100);
}, 0)) }}
{{ trans('dashboard.counter.income') }}
{{ $company->policies()->createdIn('year', $year)->expiring('after', 30)->count() }}
{{ trans('dashboard.counter.expiring') }}