@extends('header') @section('head') @parent @if ($client->hasAddress()) @endif @stop @section('content')
{!! Former::open('clients/bulk')->addClass('mainForm') !!}
{!! Former::text('action') !!} {!! Former::text('public_id')->value($client->public_id) !!}
@if ($gatewayLink) {!! Button::normal(trans('texts.view_in_stripe'))->asLinkTo($gatewayLink)->withAttributes(['target' => '_blank']) !!} @endif @if ($client->trashed()) {!! Button::primary(trans('texts.restore_client'))->withAttributes(['onclick' => 'onRestoreClick()']) !!} @else {!! DropdownButton::normal(trans('texts.edit_client')) ->withAttributes(['class'=>'normalDropDown']) ->withContents([ ['label' => trans('texts.archive_client'), 'url' => "javascript:onArchiveClick()"], ['label' => trans('texts.delete_client'), 'url' => "javascript:onDeleteClick()"], ] )->split() !!} {!! DropdownButton::primary(trans('texts.new_invoice')) ->withAttributes(['class'=>'primaryDropDown']) ->withContents($actionLinks)->split() !!} @endif {!! Former::close() !!}

{{ $client->getDisplayName() }}

@if ($client->last_login > 0)

{{ trans('texts.last_logged_in') }} {{ Utils::timestampToDateTimeString(strtotime($client->last_login)) }}

@endif

{{ trans('texts.details') }}

@if ($client->id_number)

{{ trans('texts.id_number').': '.$client->id_number }}

@endif @if ($client->vat_number)

{{ trans('texts.vat_number').': '.$client->vat_number }}

@endif @if ($client->address1) {{ $client->address1 }}
@endif @if ($client->address2) {{ $client->address2 }}
@endif @if ($client->getCityState()) {{ $client->getCityState() }}
@endif @if ($client->country) {{ $client->country->name }}
@endif @if ($client->account->custom_client_label1 && $client->custom_value1) {{ $client->account->custom_client_label1 . ': ' . $client->custom_value1 }}
@endif @if ($client->account->custom_client_label2 && $client->custom_value2) {{ $client->account->custom_client_label2 . ': ' . $client->custom_value2 }}
@endif @if ($client->work_phone) {{ $client->work_phone }} @endif @if ($client->private_notes)

{{ $client->private_notes }}

@endif @if ($client->client_industry) {{ $client->client_industry->name }}
@endif @if ($client->client_size) {{ $client->client_size->name }}
@endif @if ($client->website)

{!! Utils::formatWebsite($client->website) !!}

@endif @if ($client->language)

{{ $client->language->name }}

@endif

{{ $client->payment_terms ? trans('texts.payment_terms') . ": Net " . $client->payment_terms : '' }}

{{ trans('texts.contacts') }}

@foreach ($client->contacts as $contact) @if ($contact->first_name || $contact->last_name) {{ $contact->first_name.' '.$contact->last_name }}
@endif @if ($contact->email) {!! HTML::mailto($contact->email, $contact->email) !!}
@endif @if ($contact->phone) {{ $contact->phone }}
@endif @endforeach

{{ trans('texts.standing') }} @if ($credit > 0) @endif
{{ trans('texts.paid_to_date') }} {{ Utils::formatMoney($client->paid_to_date, $client->getCurrencyId()) }}
{{ trans('texts.balance') }} {{ Utils::formatMoney($client->balance, $client->getCurrencyId()) }}
{{ trans('texts.credit') }} {{ Utils::formatMoney($credit, $client->getCurrencyId()) }}

@if ($client->hasAddress())

@endif
{!! Datatable::table() ->addColumn( trans('texts.date'), trans('texts.message'), trans('texts.balance'), trans('texts.adjustment')) ->setUrl(url('api/activities/'. $client->public_id)) ->setCustomValues('entityType', 'activity') ->setOptions('sPaginationType', 'bootstrap') ->setOptions('bFilter', false) ->setOptions('aaSorting', [['0', 'desc']]) ->render('datatable') !!}
@if ($hasTasks)
{!! Datatable::table() ->addColumn( trans('texts.date'), trans('texts.duration'), trans('texts.description'), trans('texts.status')) ->setUrl(url('api/tasks/'. $client->public_id)) ->setCustomValues('entityType', 'tasks') ->setOptions('sPaginationType', 'bootstrap') ->setOptions('bFilter', false) ->setOptions('aaSorting', [['0', 'desc']]) ->render('datatable') !!}
@endif @if (Utils::isPro() && $hasQuotes)
{!! Datatable::table() ->addColumn( trans('texts.quote_number'), trans('texts.quote_date'), trans('texts.total'), trans('texts.valid_until'), trans('texts.status')) ->setUrl(url('api/quotes/'. $client->public_id)) ->setCustomValues('entityType', 'quotes') ->setOptions('sPaginationType', 'bootstrap') ->setOptions('bFilter', false) ->setOptions('aaSorting', [['0', 'desc']]) ->render('datatable') !!}
@endif
@if ($hasRecurringInvoices) {!! Datatable::table() ->addColumn( trans('texts.frequency_id'), trans('texts.start_date'), trans('texts.end_date'), trans('texts.invoice_total')) ->setUrl(url('api/recurring_invoices/' . $client->public_id)) ->setCustomValues('entityType', 'recurring_invoices') ->setOptions('sPaginationType', 'bootstrap') ->setOptions('bFilter', false) ->setOptions('aaSorting', [['0', 'asc']]) ->render('datatable') !!} @endif {!! Datatable::table() ->addColumn( trans('texts.invoice_number'), trans('texts.invoice_date'), trans('texts.invoice_total'), trans('texts.balance_due'), trans('texts.due_date'), trans('texts.status')) ->setUrl(url('api/invoices/' . $client->public_id)) ->setCustomValues('entityType', 'invoices') ->setOptions('sPaginationType', 'bootstrap') ->setOptions('bFilter', false) ->setOptions('aaSorting', [['0', 'desc']]) ->render('datatable') !!}
{!! Datatable::table() ->addColumn( trans('texts.invoice'), trans('texts.transaction_reference'), trans('texts.method'), trans('texts.payment_amount'), trans('texts.payment_date')) ->setUrl(url('api/payments/' . $client->public_id)) ->setCustomValues('entityType', 'payments') ->setOptions('sPaginationType', 'bootstrap') ->setOptions('bFilter', false) ->setOptions('aaSorting', [['0', 'desc']]) ->render('datatable') !!}
{!! Datatable::table() ->addColumn( trans('texts.credit_amount'), trans('texts.credit_balance'), trans('texts.credit_date'), trans('texts.private_notes')) ->setUrl(url('api/credits/' . $client->public_id)) ->setCustomValues('entityType', 'credits') ->setOptions('sPaginationType', 'bootstrap') ->setOptions('bFilter', false) ->setOptions('aaSorting', [['0', 'asc']]) ->render('datatable') !!}
@stop