{{ trans('brokers.table.title.clients') }}
| {{ trans('brokers.table.header.number') }} | {{ trans('brokers.table.header.name') }} | {{ trans('brokers.table.header.email') }} | {{ trans('brokers.table.header.policies') }} | {{ trans('brokers.table.header.due') }} | {{ trans('brokers.table.header.action') }} | 
|---|---|---|---|---|---|
| {{ $key + 1 }} | {{ $client->first_name . ' ' . $client->last_name }} | {{ $client->email }} | {{ $client->policies->count() }} | {{ $broker->currency_symbol }}{{ $client->policies->sum('premium') - $client->payments->sum('amount') }} | {{ trans('brokers.table.data.action.view') }} | 
| {{ $broker->first_name }}{{ trans('brokers.table.message.empty.clients') }} | |||||
{{ trans('brokers.table.title.policies') }}
| {{ trans('brokers.table.header.ref_no') }} | {{ trans('brokers.table.header.product') }} | {{ trans('brokers.table.header.premium') }} | {{ trans('brokers.table.header.commission') }} ({{ $broker->commission_rate }}%) | {{ trans('brokers.table.header.status') }} | {{ trans('brokers.table.header.action') }} | |
|---|---|---|---|---|---|---|
| {{ $policy->ref_no }} | {{ $policy->product->name }} | {{ $broker->currency_symbol }}{{ $policy->premium + 0 }} | {{ $broker->currency_symbol }}{{ $policy->premium * $broker->commission_rate / 100 }} | 
                                @if ($policy->premium <= $policy->paid && $policy->paid > 0)
                                  {{ trans('brokers.table.data.status.paid') }} 
                                @elseif ($policy->premium > $policy->paid && $policy->paid > 0)
                                 {{ trans('brokers.table.data.status.partial') }} 
                                @elseif ($policy->premium == $policy->paid && $policy->paid === 0)
                                 {{ trans('brokers.table.data.status.free') }} 
                                @else ($policy->premium > 0 && $policy->paid === 0)
                                 {{ trans('brokers.table.data.status.unpaid') }} 
                                @endif
                             | 
                            {{ trans('brokers.table.data.action.view') }} | |
| {{ $broker->first_name }}{{ trans('brokers.table.message.empty.policies') }} | ||||||
| {{ trans('brokers.table.header.total') }} | {{ $broker->currency_symbol }}{{ $policies->sum('premium') }} | {{ $broker->currency_symbol }}{{ $policies->sum('premium') * $broker->commission_rate / 100 }} | ||||