@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.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')
{{ trans('communication.modal.instruction.send', array(
'name' => $client->first_name . ' ' . $client->last_name,
'type' => 'an email'
)) }}
{{ trans('communication.modal.instruction.send', array(
'name' => $client->first_name . ' ' . $client->last_name,
'type' => 'a text message'
)) }}
{{ trans('payments.modal.instruction.new', array(
'name' => $client->first_name
)) }}
{{ trans('policies.modal.instruction.new') }} {{ trans('clients.modal.instruction.policy', array(
'name' => $client->first_name
)) }}
@foreach($client->notes as $note)
{{ $note->message }}
~{{ $note->writer->first_name . ' ' . $note->writer->last_name }}
{{ trans('notes.modal.button.dismiss') }}
@endforeach
@yield('client_modals')
@endsection
@section('page_scripts')
@endsection