2013-11-26 13:45:07 +01:00
|
|
|
@extends('header')
|
|
|
|
|
|
|
|
@section('content')
|
2013-11-29 13:09:21 +01:00
|
|
|
|
2013-11-26 13:45:07 +01:00
|
|
|
|
|
|
|
<div class="pull-right">
|
2013-12-03 18:32:33 +01:00
|
|
|
{{ Former::open('clients/bulk')->addClass('mainForm') }}
|
|
|
|
<div style="display:none">
|
|
|
|
{{ Former::text('action') }}
|
2013-12-04 17:20:14 +01:00
|
|
|
{{ Former::text('id')->value($client->public_id) }}
|
2013-12-03 18:32:33 +01:00
|
|
|
</div>
|
|
|
|
|
|
|
|
{{ DropdownButton::normal('Edit Client',
|
|
|
|
Navigation::links(
|
|
|
|
array(
|
2013-12-04 17:20:14 +01:00
|
|
|
array('Edit Client', URL::to('clients/' . $client->public_id . '/edit')),
|
2013-12-03 18:32:33 +01:00
|
|
|
array(Navigation::DIVIDER),
|
|
|
|
array('Archive Client', "javascript:onArchiveClick()"),
|
|
|
|
array('Delete Client', "javascript:onDeleteClick()"),
|
|
|
|
)
|
|
|
|
)
|
|
|
|
, array('id'=>'actionDropDown'))->split(); }}
|
2013-11-26 13:45:07 +01:00
|
|
|
{{ Button::primary_link(URL::to('invoices/create/' . $client->id), 'Create Invoice') }}
|
2013-12-03 18:32:33 +01:00
|
|
|
{{ Former::close() }}
|
|
|
|
|
2013-11-26 13:45:07 +01:00
|
|
|
</div>
|
|
|
|
|
2013-11-29 13:09:21 +01:00
|
|
|
<h2>{{ $client->name }}</h2>
|
2013-12-03 18:32:33 +01:00
|
|
|
@if ($client->last_login > 0)
|
|
|
|
<h3 style="margin-top:0px"><small>
|
|
|
|
Last logged in {{ timestampToDateTimeString($client->last_login); }}
|
|
|
|
</small></h3>
|
|
|
|
@endif
|
2013-11-29 13:09:21 +01:00
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
|
|
|
|
<div class="col-md-3">
|
|
|
|
<h3>Details</h3>
|
|
|
|
<p>{{ $client->getAddress() }}</p>
|
|
|
|
<p>{{ $client->getPhone() }}</p>
|
|
|
|
<p>{{ $client->getNotes() }}</p>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="col-md-3">
|
|
|
|
<h3>Contacts</h3>
|
|
|
|
@foreach ($client->contacts as $contact)
|
|
|
|
{{ $contact->getDetails() }}
|
|
|
|
@endforeach
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="col-md-6">
|
2013-12-01 13:22:08 +01:00
|
|
|
<h3>Standing</h3>
|
2013-11-29 13:09:21 +01:00
|
|
|
<h3>$0.00 <small>Paid to Date USD</small></h3>
|
2013-12-01 13:22:08 +01:00
|
|
|
<h3>$0.00 <small>Balance USD</small></h3>
|
2013-11-29 13:09:21 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<p> </p>
|
|
|
|
|
|
|
|
<ul class="nav nav-tabs nav-justified">
|
|
|
|
{{ HTML::tab_link('#activity', 'Activity', true) }}
|
|
|
|
{{ HTML::tab_link('#invoices', 'Invoices') }}
|
|
|
|
{{ HTML::tab_link('#payments', 'Payments') }}
|
2013-12-01 21:58:25 +01:00
|
|
|
{{ HTML::tab_link('#credits', 'Credits') }}
|
2013-11-29 13:09:21 +01:00
|
|
|
</ul>
|
|
|
|
|
|
|
|
<div class="tab-content">
|
|
|
|
|
|
|
|
<div class="tab-pane active" id="activity">
|
|
|
|
|
|
|
|
{{ Datatable::table()
|
2013-12-01 21:58:25 +01:00
|
|
|
->addColumn('Date', 'Message', 'Balance')
|
2013-12-04 17:20:14 +01:00
|
|
|
->setUrl(url('api/activities/'. $client->public_id))
|
2013-11-29 13:09:21 +01:00
|
|
|
->setOptions('sPaginationType', 'bootstrap')
|
|
|
|
->setOptions('bFilter', false)
|
2013-12-05 21:25:20 +01:00
|
|
|
->render('datatable') }}
|
2013-11-29 13:09:21 +01:00
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="tab-pane" id="invoices">
|
|
|
|
|
|
|
|
{{ Datatable::table()
|
2013-12-01 21:58:25 +01:00
|
|
|
->addColumn('Invoice Number', 'Total', 'Amount Due', 'Invoice Date', 'Due Date', 'Status')
|
2013-12-04 17:20:14 +01:00
|
|
|
->setUrl(url('api/invoices/' . $client->public_id))
|
2013-11-29 13:09:21 +01:00
|
|
|
->setOptions('sPaginationType', 'bootstrap')
|
|
|
|
->setOptions('bFilter', false)
|
2013-12-05 21:25:20 +01:00
|
|
|
->render('datatable') }}
|
2013-11-29 13:09:21 +01:00
|
|
|
|
|
|
|
</div>
|
|
|
|
<div class="tab-pane" id="payments">
|
|
|
|
|
|
|
|
{{ Datatable::table()
|
2013-12-05 16:23:24 +01:00
|
|
|
->addColumn('Transaction Reference', 'Invoice', 'Amount', 'Payment Date')
|
2013-12-04 17:20:14 +01:00
|
|
|
->setUrl(url('api/payments/' . $client->public_id))
|
2013-11-29 13:09:21 +01:00
|
|
|
->setOptions('sPaginationType', 'bootstrap')
|
|
|
|
->setOptions('bFilter', false)
|
2013-12-05 21:25:20 +01:00
|
|
|
->render('datatable') }}
|
2013-11-29 13:09:21 +01:00
|
|
|
|
|
|
|
</div>
|
2013-12-01 21:58:25 +01:00
|
|
|
<div class="tab-pane" id="credits">
|
|
|
|
|
|
|
|
{{ Datatable::table()
|
2013-12-05 16:23:24 +01:00
|
|
|
->addColumn('Amount', 'Credit Date')
|
2013-12-04 17:20:14 +01:00
|
|
|
->setUrl(url('api/credits/' . $client->public_id))
|
2013-12-01 21:58:25 +01:00
|
|
|
->setOptions('sPaginationType', 'bootstrap')
|
|
|
|
->setOptions('bFilter', false)
|
2013-12-05 21:25:20 +01:00
|
|
|
->render('datatable') }}
|
2013-12-01 21:58:25 +01:00
|
|
|
|
|
|
|
</div>
|
2013-11-29 13:09:21 +01:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
|
|
|
|
$(function() {
|
2013-12-03 18:32:33 +01:00
|
|
|
$('#actionDropDown > button:first').click(function() {
|
2013-12-04 17:20:14 +01:00
|
|
|
window.location = '{{ URL::to('clients/' . $client->public_id . '/edit') }}';
|
2013-12-03 18:32:33 +01:00
|
|
|
});
|
2013-11-29 13:09:21 +01:00
|
|
|
});
|
|
|
|
|
2013-12-03 18:32:33 +01:00
|
|
|
function onArchiveClick() {
|
|
|
|
$('#action').val('archive');
|
|
|
|
$('.mainForm').submit();
|
|
|
|
}
|
|
|
|
|
|
|
|
function onDeleteClick() {
|
|
|
|
if (confirm('Are you sure you want to delete this client?')) {
|
|
|
|
$('#action').val('delete');
|
|
|
|
$('.mainForm').submit();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-11-29 13:09:21 +01:00
|
|
|
</script>
|
|
|
|
|
2013-11-26 13:45:07 +01:00
|
|
|
@stop
|