@extends('header') @section('content') @if (!$client->trashed())
{{ Former::open('clients/bulk')->addClass('mainForm') }}
{{ Former::text('action') }} {{ Former::text('id')->value($client->public_id) }}
{{ DropdownButton::normal(trans('texts.edit_client'), Navigation::links( [ [trans('texts.edit_client'), URL::to('clients/' . $client->public_id . '/edit')], [Navigation::DIVIDER], [trans('texts.archive_client'), "javascript:onArchiveClick()"], [trans('texts.delete_client'), "javascript:onDeleteClick()"], ] ) , ['id'=>'normalDropDown'])->split(); }} {{ DropdownButton::primary('Create Invoice', Navigation::links( [ [trans('texts.create_invoice'), URL::to('invoices/create/' . $client->public_id )], [trans('texts.enter_payment'), URL::to('payments/create/' . $client->public_id )], [trans('texts.enter_credit'), URL::to('credits/create/' . $client->public_id )], ] ) , ['id'=>'primaryDropDown'])->split(); }} {{ Former::close() }}
@endif

{{ $client->getDisplayName() }}

@if ($client->last_login > 0)

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

@endif

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

{{ $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 ($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