1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 21:22:58 +01:00
invoiceninja/app/views/clients/show.blade.php

181 lines
5.4 KiB
PHP
Raw Normal View History

2013-11-26 13:45:07 +01:00
@extends('header')
2013-12-07 19:45:00 +01:00
@section('content')
2013-11-29 13:09:21 +01:00
2013-11-26 13:45:07 +01:00
2014-02-18 22:56:18 +01:00
@if (!$client->trashed())
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(
2013-12-09 10:38:49 +01:00
[
['Edit Client', URL::to('clients/' . $client->public_id . '/edit')],
[Navigation::DIVIDER],
['Archive Client', "javascript:onArchiveClick()"],
['Delete Client', "javascript:onDeleteClick()"],
]
2013-12-03 18:32:33 +01:00
)
2013-12-09 10:38:49 +01:00
, ['id'=>'normalDropDown'])->split(); }}
{{ DropdownButton::primary('Create Invoice',
Navigation::links(
[
['Create Invoice', URL::to('invoices/create/' . $client->public_id )],
2014-01-15 15:01:24 +01:00
['Enter Payment', URL::to('payments/create/' . $client->public_id )],
['Enter Credit', URL::to('credits/create/' . $client->public_id )],
2013-12-09 10:38:49 +01:00
]
)
, ['id'=>'primaryDropDown'])->split(); }}
2014-02-18 22:56:18 +01:00
{{ Former::close() }}
2013-11-26 13:45:07 +01:00
</div>
2014-02-18 22:56:18 +01:00
@endif
2013-11-26 13:45:07 +01:00
2013-12-31 10:43:39 +01:00
<h2>{{ $client->getDisplayName() }}</h2>
2013-12-03 18:32:33 +01:00
@if ($client->last_login > 0)
<h3 style="margin-top:0px"><small>
2013-12-31 10:43:39 +01:00
Last logged in {{ Utils::timestampToDateTimeString(strtotime($client->last_login)); }}
2013-12-03 18:32:33 +01:00
</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>
2013-12-11 21:33:44 +01:00
<p>{{ $client->getIndustry() }}</p>
2013-12-31 10:43:39 +01:00
<p>{{ $client->getWebsite() }}</p>
<p>{{ $client->payment_terms ? "Payment terms: Net " . $client->payment_terms : '' }}</p>
2013-11-29 13:09:21 +01:00
</div>
<div class="col-md-3">
<h3>Contacts</h3>
@foreach ($client->contacts as $contact)
{{ $contact->getDetails() }}
@endforeach
</div>
<div class="col-md-6">
2014-01-16 22:12:46 +01:00
<h3>Standing
<table class="table" style="width:300px">
<tr>
<td><small>Paid to Date</small></td>
<td style="text-align: right">{{ Utils::formatMoney($client->paid_to_date, $client->currency_id); }}</td>
</tr>
<tr>
<td><small>Balance</small></td>
<td style="text-align: right">{{ Utils::formatMoney($client->balance, $client->currency_id); }}</td>
</tr>
@if ($credit > 0)
<tr>
<td><small>Credit</small></td>
<td style="text-align: right">{{ Utils::formatMoney($credit, $client->currency_id); }}</td>
</tr>
@endif
</table>
</h3>
2013-11-29 13:09:21 +01:00
</div>
</div>
<p>&nbsp;</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-30 21:17:45 +01:00
->addColumn('Date', 'Message', 'Balance', 'Adjustment')
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)
2014-02-18 22:56:18 +01:00
->setOptions('aaSorting', [['0', 'desc']])
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">
2013-12-10 23:10:43 +01:00
@if ($hasRecurringInvoices)
{{ Datatable::table()
2013-12-11 21:33:44 +01:00
->addColumn('How Often', 'Start Date', 'End Date', 'Invoice Total')
2013-12-10 23:10:43 +01:00
->setUrl(url('api/recurring_invoices/' . $client->public_id))
->setOptions('sPaginationType', 'bootstrap')
->setOptions('bFilter', false)
2014-02-18 22:56:18 +01:00
->setOptions('aaSorting', [['0', 'asc']])
2013-12-10 23:10:43 +01:00
->render('datatable') }}
@endif
2013-11-29 13:09:21 +01:00
{{ Datatable::table()
2013-12-11 21:33:44 +01:00
->addColumn('Invoice Number', 'Invoice Date', 'Invoice Total', 'Balance Due', '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)
2014-02-18 22:56:18 +01:00
->setOptions('aaSorting', [['0', 'asc']])
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()
2014-01-16 22:12:46 +01:00
->addColumn('Invoice', 'Transaction Reference', 'Method', 'Payment 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)
2014-02-18 22:56:18 +01:00
->setOptions('aaSorting', [['0', 'asc']])
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()
2014-01-16 22:12:46 +01:00
->addColumn('Credit Amount', 'Credit Balance', 'Credit Date', 'Private Notes')
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)
2014-02-18 22:56:18 +01:00
->setOptions('aaSorting', [['0', 'asc']])
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-09 10:38:49 +01:00
$('#normalDropDown > 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-12-09 10:38:49 +01:00
$('#primaryDropDown > button:first').click(function() {
window.location = '{{ URL::to('invoices/create/' . $client->public_id ) }}';
});
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