@extends('global.app') @section('title', trans('clients.title.one')) @section('page_stylesheets') @endsection @section('extra_stylesheets') @endsection @section('content') @parent
@include('global.status')

{{ trans('clients.label.details') }}

{{ trans('clients.label.name') }}

{{ $client->first_name . ' ' . $client->last_name }}

{{ trans('clients.label.policies') }}

{{ $client->policies->count() }}

@if ($client->policies->sum('premium') <= $client->policies->sum('paid') && $client->policies->sum('paid') > 0) {{ trans('policies.label.paid_in_full') }} @elseif ($client->policies->sum('due') > 0 && $client->policies->where('statusClass', 'warning')->count() > ($client->policies->count() / 3)) {{ trans('policies.label.due') }} - {{ $client->currency_symbol }}{{ $client->policies->sum('due') }} @elseif ($client->policies->sum('due') > 0 && $client->policies->where('statusClass', 'negative')->count() > ($client->policies->count() / 3)) {{ trans('policies.label.due') }} - {{ $client->currency_symbol }}{{ $client->policies->sum('due') }} @endif
{{ trans('clients.label.email') }}

{{ $client->email }}

{{ trans('clients.label.birthday') }}

{{ is_null($client->birthday) ? '---------- --, ----' : date('jS F Y', strtotime($client->birthday)) }}

{{ trans('clients.label.phone') }}

{{ $client->phone or '(---) ---- --- ---' }}

{{ trans('clients.label.address') }}

{{ $client->address or '. . .' }}

@foreach ($client->customFields->all() as $custom_field)
{{ $custom_field->label }}

{{ is_object(json_decode($custom_field->value)) ? json_decode($custom_field->value)->choice : $custom_field->value }}

@endforeach
@endsection @section('modals') @foreach($client->notes as $note) @endforeach @yield('client_modals') @endsection @section('page_scripts') @endsection