@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'), Navigation::links($actionLinks), ['id'=>'primaryDropDown'])->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').': '.$this->id_number }}

@endif

{{ $client->getVatNumber() }}

{{ $client->getAddress() }}

{{ $client->getCustomFields() }}

{{ $client->getPhone() }}

{{ $client->getNotes() }}

{{ $client->getIndustry() }}

{{ $client->getWebsite() }}

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

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

@foreach ($client->contacts as $contact) {{ $contact->getDetails() }} @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