@extends('header') @section('content')
{!! Former::open('clients/bulk')->addClass('mainForm') !!}
{!! Former::text('action') !!} {!! Former::text('id')->value($client->public_id) !!}
@if ($gatewayLink) {!! Button::link($gatewayLink, trans('texts.view_in_stripe'), ['target' => '_blank']) !!} @endif @if ($client->trashed()) {!! Button::primary(trans('texts.restore_client'), ['onclick' => 'onRestoreClick()']) !!} @else {!! DropdownButton::normal(trans('texts.edit_client')) ->withAttributes(['class'=>'normalDropDown']) ->withContents([ ['label' => trans('texts.edit_client'), 'url' => URL::to('clients/' . $client->public_id . '/edit')], Navigation::NAVIGATION_DIVIDER, ['label' => trans('texts.archive_client'), 'url' => "javascript:onArchiveClick()"], ['label' => trans('texts.delete_client'), 'url' => "javascript:onDeleteClick()"], ] )->split() !!} {!! DropdownButton::primary(trans('texts.create_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->city) {{ $client->city }}, @endif @if ($client->state) {{ $client->state }} @endif @if ($client->postal_code) {{ $client->postal_code }} @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) {{ Utils::formatPhoneNumber($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)

{!! $client->getWebsite() !!}

@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) {!! Utils::formatPhoneNumber($contact->phone) !!} @endif @endforeach

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

 

{!! Datatable::table() ->addColumn( trans('texts.date'), trans('texts.message'), trans('texts.balance'), trans('texts.adjustment')) ->setUrl(url('api/activities/'. $client->public_id)) ->setOptions('sPaginationType', 'bootstrap') ->setOptions('bFilter', false) ->setOptions('aaSorting', [['0', 'desc']]) ->render('datatable') !!}
@if (Utils::isPro())
{!! Datatable::table() ->addColumn( trans('texts.quote_number'), trans('texts.quote_date'), trans('texts.total'), trans('texts.due_date'), trans('texts.status')) ->setUrl(url('api/quotes/'. $client->public_id)) ->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)) ->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)) ->setOptions('sPaginationType', 'bootstrap') ->setOptions('bFilter', false) ->setOptions('aaSorting', [['0', 'asc']]) ->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)) ->setOptions('sPaginationType', 'bootstrap') ->setOptions('bFilter', false) ->setOptions('aaSorting', [['0', 'asc']]) ->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)) ->setOptions('sPaginationType', 'bootstrap') ->setOptions('bFilter', false) ->setOptions('aaSorting', [['0', 'asc']]) ->render('datatable') !!}
@stop