1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-20 16:31:33 +02:00
invoiceninja/resources/views/dashboard.blade.php

284 lines
14 KiB
PHP
Raw Normal View History

2015-03-16 22:45:25 +01:00
@extends('header')
2015-10-29 22:56:45 +01:00
2015-03-16 22:45:25 +01:00
@section('content')
<div class="row">
2016-07-30 21:10:00 +02:00
<div class="col-md-4">
2015-03-16 22:45:25 +01:00
<div class="panel panel-default">
<div class="panel-body">
2016-07-30 21:10:00 +02:00
<img src="{{ asset('images/totalinvoices.png') }}"
class="in-image" style="float:left"/>
<div style="overflow:hidden">
<div class="in-thin">
{{ trans('texts.total_revenue') }}
</div>
<div class="in-bold">
@if (count($paidToDate))
@foreach ($paidToDate as $item)
{{ Utils::formatMoney($item->value, $item->currency_id) }}<br/>
@endforeach
@else
{{ Utils::formatMoney(0) }}
@endif
</div>
2015-03-16 22:45:25 +01:00
</div>
</div>
</div>
</div>
<div class="col-md-4">
<div class="panel panel-default">
<div class="panel-body">
2016-07-30 21:10:00 +02:00
<img src="{{ asset('images/clients.png') }}"
class="in-image" style="float:left"/>
<div style="overflow:hidden">
<div class="in-thin">
{{ trans('texts.average_invoice') }}
</div>
<div class="in-bold">
@if (count($averageInvoice))
@foreach ($averageInvoice as $item)
{{ Utils::formatMoney($item->invoice_avg, $item->currency_id) }}<br/>
@endforeach
@else
{{ Utils::formatMoney(0) }}
@endif
</div>
2015-03-16 22:45:25 +01:00
</div>
</div>
</div>
</div>
<div class="col-md-4">
<div class="panel panel-default">
<div class="panel-body">
2016-07-30 21:10:00 +02:00
<img src="{{ asset('images/totalincome.png') }}"
class="in-image" style="float:left"/>
<div style="overflow:hidden">
<div class="in-thin">
{{ trans('texts.outstanding') }}
</div>
<div class="in-bold">
@if (count($balances))
@foreach ($balances as $item)
{{ Utils::formatMoney($item->value, $item->currency_id) }}<br/>
@endforeach
@else
{{ Utils::formatMoney(0) }}
@endif
</div>
2015-03-16 22:45:25 +01:00
</div>
</div>
</div>
</div>
</div>
<p>&nbsp;</p>
<div class="row">
<div class="col-md-6">
2015-07-29 21:55:12 +02:00
<div class="panel panel-default dashboard" style="height:320px">
2015-04-22 21:21:04 +02:00
<div class="panel-heading" style="background-color:#0b4d78 !important">
2015-03-16 22:45:25 +01:00
<h3 class="panel-title in-bold-white">
2015-12-21 20:57:55 +01:00
<i class="glyphicon glyphicon-exclamation-sign"></i> {{ trans('texts.activity') }}
2015-07-29 21:55:12 +02:00
<div class="pull-right" style="font-size:14px;padding-top:4px">
2015-09-07 11:07:55 +02:00
{{ trans_choice('texts.invoices_sent', $invoicesSent) }}
2015-07-29 21:55:12 +02:00
</div>
2015-03-16 22:45:25 +01:00
</h3>
</div>
2015-07-29 21:55:12 +02:00
<ul class="panel-body list-group" style="height:276px;overflow-y:auto;">
2015-03-16 22:45:25 +01:00
@foreach ($activities as $activity)
<li class="list-group-item">
<span style="color:#888;font-style:italic">{{ Utils::timestampToDateString(strtotime($activity->created_at)) }}:</span>
2015-10-28 20:22:07 +01:00
{!! $activity->getMessage() !!}
2015-03-16 22:45:25 +01:00
</li>
@endforeach
</ul>
2016-07-30 21:10:00 +02:00
</div>
</div>
<div class="col-md-6">
2015-07-29 21:55:12 +02:00
<div class="panel panel-default dashboard" style="height:320px;">
<div class="panel-heading" style="margin:0; background-color: #f5f5f5 !important;">
<h3 class="panel-title" style="color: black !important">
<i class="glyphicon glyphicon-ok-sign"></i> {{ trans('texts.recent_payments') }}
</h3>
</div>
<div class="panel-body" style="height:274px;overflow-y:auto;">
<table class="table table-striped">
<thead>
<th>{{ trans('texts.invoice_number_short') }}</th>
<th>{{ trans('texts.client') }}</th>
<th>{{ trans('texts.payment_date') }}</th>
<th>{{ trans('texts.amount') }}</th>
</thead>
<tbody>
@foreach ($payments as $payment)
<tr>
<td>{!! \App\Models\Invoice::calcLink($payment) !!}</td>
2016-04-26 03:53:39 +02:00
@can('viewByOwner', [ENTITY_CLIENT, $payment->client_user_id])
2016-03-16 03:29:30 +01:00
<td>{!! link_to('/clients/'.$payment->client_public_id, trim($payment->client_name) ?: (trim($payment->first_name . ' ' . $payment->last_name) ?: $payment->email)) !!}</td>
@else
<td>{{ trim($payment->client_name) ?: (trim($payment->first_name . ' ' . $payment->last_name) ?: $payment->email) }}</td>
2016-04-26 03:53:39 +02:00
@endcan
2015-07-29 21:55:12 +02:00
<td>{{ Utils::fromSqlDate($payment->payment_date) }}</td>
<td>{{ Utils::formatMoney($payment->amount, $payment->currency_id ?: ($account->currency_id ?: DEFAULT_CURRENCY)) }}</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
2015-03-16 22:45:25 +01:00
</div>
</div>
<div class="row">
2016-07-30 21:10:00 +02:00
<div class="col-md-6">
<div class="panel panel-default dashboard" style="height:320px;">
<div class="panel-heading" style="margin:0; background-color: #f5f5f5 !important;">
<h3 class="panel-title" style="color: black !important">
<i class="glyphicon glyphicon-time"></i> {{ trans('texts.upcoming_invoices') }}
2015-03-16 22:45:25 +01:00
</h3>
</div>
2015-07-29 21:55:12 +02:00
<div class="panel-body" style="height:274px;overflow-y:auto;">
2015-03-16 22:45:25 +01:00
<table class="table table-striped">
<thead>
<th>{{ trans('texts.invoice_number_short') }}</th>
<th>{{ trans('texts.client') }}</th>
<th>{{ trans('texts.due_date') }}</th>
<th>{{ trans('texts.balance_due') }}</th>
</thead>
<tbody>
@foreach ($upcoming as $invoice)
2016-05-26 16:56:54 +02:00
@if ($invoice->invoice_type_id == INVOICE_TYPE_STANDARD)
<tr>
<td>{!! \App\Models\Invoice::calcLink($invoice) !!}</td>
2016-04-26 03:53:39 +02:00
@can('viewByOwner', [ENTITY_CLIENT, $invoice->client_user_id])
2016-03-20 02:57:20 +01:00
<td>{!! link_to('/clients/'.$invoice->client_public_id, trim($invoice->client_name) ?: (trim($invoice->first_name . ' ' . $invoice->last_name) ?: $invoice->email)) !!}</td>
2016-03-16 03:29:30 +01:00
@else
2016-03-20 02:57:20 +01:00
<td>{{ trim($invoice->client_name) ?: (trim($invoice->first_name . ' ' . $invoice->last_name) ?: $invoice->email) }}</td>
2016-04-26 03:53:39 +02:00
@endcan
<td>{{ Utils::fromSqlDate($invoice->due_date) }}</td>
<td>{{ Utils::formatMoney($invoice->balance, $invoice->currency_id ?: ($account->currency_id ?: DEFAULT_CURRENCY)) }}</td>
</tr>
@endif
2015-03-16 22:45:25 +01:00
@endforeach
</tbody>
</table>
</div>
</div>
</div>
2016-03-16 03:29:30 +01:00
<div class="col-md-6">
<div class="panel panel-default dashboard" style="height:320px">
<div class="panel-heading" style="background-color:#e37329 !important">
<h3 class="panel-title in-bold-white">
<i class="glyphicon glyphicon-time"></i> {{ trans('texts.invoices_past_due') }}
2015-03-16 22:45:25 +01:00
</h3>
</div>
2015-07-29 21:55:12 +02:00
<div class="panel-body" style="height:274px;overflow-y:auto;">
2015-03-16 22:45:25 +01:00
<table class="table table-striped">
<thead>
<th>{{ trans('texts.invoice_number_short') }}</th>
<th>{{ trans('texts.client') }}</th>
<th>{{ trans('texts.due_date') }}</th>
<th>{{ trans('texts.balance_due') }}</th>
</thead>
<tbody>
@foreach ($pastDue as $invoice)
2016-05-26 16:56:54 +02:00
@if ($invoice->invoice_type_id == INVOICE_TYPE_STANDARD)
<tr>
<td>{!! \App\Models\Invoice::calcLink($invoice) !!}</td>
2016-04-26 03:53:39 +02:00
@can('viewByOwner', [ENTITY_CLIENT, $invoice->client_user_id])
2016-03-20 02:57:20 +01:00
<td>{!! link_to('/clients/'.$invoice->client_public_id, trim($invoice->client_name) ?: (trim($invoice->first_name . ' ' . $invoice->last_name) ?: $invoice->email)) !!}</td>
2016-03-16 03:29:30 +01:00
@else
2016-03-20 02:57:20 +01:00
<td>{{ trim($invoice->client_name) ?: (trim($invoice->first_name . ' ' . $invoice->last_name) ?: $invoice->email) }}</td>
2016-04-26 03:53:39 +02:00
@endcan
<td>{{ Utils::fromSqlDate($invoice->due_date) }}</td>
<td>{{ Utils::formatMoney($invoice->balance, $invoice->currency_id ?: ($account->currency_id ?: DEFAULT_CURRENCY)) }}</td>
</tr>
@endif
2015-03-16 22:45:25 +01:00
@endforeach
</tbody>
</table>
</div>
2016-07-30 21:10:00 +02:00
</div>
2015-03-16 22:45:25 +01:00
</div>
2015-05-08 10:21:29 +02:00
</div>
2015-03-16 22:45:25 +01:00
@if ($hasQuotes)
<div class="row">
2016-07-30 21:10:00 +02:00
<div class="col-md-6">
<div class="panel panel-default dashboard" style="height:320px;">
<div class="panel-heading" style="margin:0; background-color: #f5f5f5 !important;">
<h3 class="panel-title" style="color: black !important">
<i class="glyphicon glyphicon-time"></i> {{ trans('texts.upcoming_quotes') }}
</h3>
</div>
<div class="panel-body" style="height:274px;overflow-y:auto;">
<table class="table table-striped">
<thead>
<th>{{ trans('texts.quote_number_short') }}</th>
<th>{{ trans('texts.client') }}</th>
2015-11-04 14:57:59 +01:00
<th>{{ trans('texts.valid_until') }}</th>
<th>{{ trans('texts.amount') }}</th>
</thead>
<tbody>
@foreach ($upcoming as $invoice)
2016-07-30 21:10:00 +02:00
@if ($invoice->invoice_type_id == INVOICE_TYPE_QUOTE)
<tr>
<td>{!! \App\Models\Invoice::calcLink($invoice) !!}</td>
<td>{!! link_to('/clients/'.$invoice->client_public_id, trim($invoice->client_name) ?: (trim($invoice->first_name . ' ' . $invoice->last_name) ?: $invoice->email)) !!}</td>
<td>{{ Utils::fromSqlDate($invoice->due_date) }}</td>
<td>{{ Utils::formatMoney($invoice->balance, $invoice->currency_id ?: ($account->currency_id ?: DEFAULT_CURRENCY)) }}</td>
</tr>
@endif
@endforeach
</tbody>
</table>
</div>
</div>
</div>
2016-07-30 21:10:00 +02:00
<div class="col-md-6">
<div class="panel panel-default dashboard" style="height:320px">
<div class="panel-heading" style="background-color:#e37329 !important">
<h3 class="panel-title in-bold-white">
<i class="glyphicon glyphicon-time"></i> {{ trans('texts.expired_quotes') }}
</h3>
</div>
<div class="panel-body" style="height:274px;overflow-y:auto;">
<table class="table table-striped">
<thead>
<th>{{ trans('texts.quote_number_short') }}</th>
<th>{{ trans('texts.client') }}</th>
2015-11-04 14:57:59 +01:00
<th>{{ trans('texts.valid_until') }}</th>
<th>{{ trans('texts.amount') }}</th>
</thead>
<tbody>
@foreach ($pastDue as $invoice)
2016-07-30 21:10:00 +02:00
@if ($invoice->invoice_type_id == INVOICE_TYPE_QUOTE)
<tr>
<td>{!! \App\Models\Invoice::calcLink($invoice) !!}</td>
<td>{!! link_to('/clients/'.$invoice->client_public_id, trim($invoice->client_name) ?: (trim($invoice->first_name . ' ' . $invoice->last_name) ?: $invoice->email)) !!}</td>
<td>{{ Utils::fromSqlDate($invoice->due_date) }}</td>
<td>{{ Utils::formatMoney($invoice->balance, $invoice->currency_id ?: ($account->currency_id ?: DEFAULT_CURRENCY)) }}</td>
</tr>
@endif
@endforeach
</tbody>
</table>
</div>
2016-07-30 21:10:00 +02:00
</div>
</div>
</div>
@endif
2015-10-18 09:30:28 +02:00
<script type="text/javascript">
$(function() {
$('.normalDropDown:not(.dropdown-toggle)').click(function() {
window.location = '{{ URL::to('invoices/create') }}';
});
});
</script>
2016-07-30 21:10:00 +02:00
@stop