link to reports
This commit is contained in:
parent
291cf959ce
commit
1cf927a29b
@ -18,9 +18,16 @@ class All
|
||||
public function compose(View $view)
|
||||
{
|
||||
// Make sure it's installed
|
||||
if (env('APP_INSTALLED')) {
|
||||
// Share date format
|
||||
$view->with(['date_format' => $this->getCompanyDateFormat()]);
|
||||
if (!env('APP_INSTALLED')) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Share user logged in
|
||||
$auth_user = auth()->user();
|
||||
|
||||
// Share date format
|
||||
$date_format = $this->getCompanyDateFormat();
|
||||
|
||||
$view->with(['auth_user' => $auth_user, 'date_format' => $date_format]);
|
||||
}
|
||||
}
|
||||
|
@ -41,7 +41,11 @@
|
||||
<tbody>
|
||||
@foreach($accounts as $item)
|
||||
<tr>
|
||||
@if ($auth_user->can('read-reports-income-expense-summary'))
|
||||
<td><a href="{{ url('reports/income-expense-summary?accounts[]=' . $item->id) }}">{{ $item->name }}</a></td>
|
||||
@else
|
||||
<td><a href="{{ route('accounts.edit', $item->id) }}">{{ $item->name }}</a></td>
|
||||
@endif
|
||||
<td class="hidden-xs">{{ $item->number }}</td>
|
||||
<td class="text-right amount-space">@money($item->balance, $item->currency_code, true)</td>
|
||||
<td class="hidden-xs">
|
||||
|
@ -7,7 +7,11 @@
|
||||
<!---Income-->
|
||||
<div class="col-md-4">
|
||||
<div class="info-box">
|
||||
@if ($auth_user->can('read-reports-income-summary'))
|
||||
<a href="{{ url('reports/income-summary') }}"><span class="info-box-icon bg-aqua"><i class="fa fa-money"></i></span></a>
|
||||
@else
|
||||
<span class="info-box-icon bg-aqua"><i class="fa fa-money"></i></span>
|
||||
@endif
|
||||
|
||||
<div class="info-box-content">
|
||||
<span class="info-box-text">{{ trans('dashboard.total_incomes') }}</span>
|
||||
@ -26,7 +30,11 @@
|
||||
<!---Expense-->
|
||||
<div class="col-md-4">
|
||||
<div class="info-box">
|
||||
@if ($auth_user->can('read-reports-expense-summary'))
|
||||
<a href="{{ url('reports/expense-summary') }}"><span class="info-box-icon bg-red"><i class="fa fa-shopping-cart"></i></span></a>
|
||||
@else
|
||||
<span class="info-box-icon bg-red"><i class="fa fa-shopping-cart"></i></span>
|
||||
@endif
|
||||
|
||||
<div class="info-box-content">
|
||||
<span class="info-box-text">{{ trans('dashboard.total_expenses') }}</span>
|
||||
@ -46,7 +54,11 @@
|
||||
<!---Profit-->
|
||||
<div class="col-md-4">
|
||||
<div class="info-box">
|
||||
@if ($auth_user->can('read-reports-income-expense-summary'))
|
||||
<a href="{{ url('reports/income-expense-summary') }}"><span class="info-box-icon bg-green"><i class="fa fa-heart"></i></span></a>
|
||||
@else
|
||||
<span class="info-box-icon bg-green"><i class="fa fa-heart"></i></span>
|
||||
@endif
|
||||
|
||||
<div class="info-box-content">
|
||||
<span class="info-box-text">{{ trans('dashboard.total_profit') }}</span>
|
||||
|
@ -62,6 +62,9 @@
|
||||
</button>
|
||||
<ul class="dropdown-menu dropdown-menu-right">
|
||||
<li><a href="{{ url('expenses/vendors/' . $item->id) }}">{{ trans('general.show') }}</a></li>
|
||||
@permission('read-reports-expense-summary')
|
||||
<li><a href="{{ url('reports/expense-summary?vendors[]=' . $item->id) }}">{{ trans_choice('general.reports', 1) }}</a></li>
|
||||
@endpermission
|
||||
<li><a href="{{ url('expenses/vendors/' . $item->id . '/edit') }}">{{ trans('general.edit') }}</a></li>@if ($item->enabled)
|
||||
<li><a href="{{ route('vendors.disable', $item->id) }}">{{ trans('general.disable') }}</a></li>
|
||||
@else
|
||||
|
@ -62,6 +62,9 @@
|
||||
</button>
|
||||
<ul class="dropdown-menu dropdown-menu-right">
|
||||
<li><a href="{{ url('incomes/customers/' . $item->id) }}">{{ trans('general.show') }}</a></li>
|
||||
@permission('read-reports-income-summary')
|
||||
<li><a href="{{ url('reports/income-summary?customers[]=' . $item->id) }}">{{ trans_choice('general.reports', 1) }}</a></li>
|
||||
@endpermission
|
||||
<li><a href="{{ url('incomes/customers/' . $item->id . '/edit') }}">{{ trans('general.edit') }}</a></li>
|
||||
@if ($item->enabled)
|
||||
<li><a href="{{ route('customers.disable', $item->id) }}">{{ trans('general.disable') }}</a></li>
|
||||
|
@ -42,7 +42,17 @@
|
||||
<tbody>
|
||||
@foreach($categories as $item)
|
||||
<tr>
|
||||
<td><a href="{{ url('settings/categories/' . $item->id . '/edit') }}">{{ $item->name }}</a></td>
|
||||
<td>
|
||||
@if (($item->type == 'income') && $auth_user->can('read-reports-income-summary'))
|
||||
<a href="{{ url('reports/income-summary?categories[]=' . $item->id) }}">{{ $item->name }}</a>
|
||||
@elseif (($item->type == 'expense') && $auth_user->can('read-reports-expense-summary'))
|
||||
<a href="{{ url('reports/expense-summary?categories[]=' . $item->id) }}">{{ $item->name }}</a>
|
||||
@elseif (($item->type == 'item') && $auth_user->can('read-common-items'))
|
||||
<a href="{{ url('common/items?categories[]=' . $item->id) }}">{{ $item->name }}</a>
|
||||
@else
|
||||
<a href="{{ url('settings/categories/' . $item->id . '/edit') }}">{{ $item->name }}</a>
|
||||
@endif
|
||||
</td>
|
||||
<td>{{ $types[$item->type] }}</td>
|
||||
<td class="hidden-xs"><i class="fa fa-2x fa-circle" style="color:{{ $item->color }};"></i></td>
|
||||
<td class="hidden-xs">
|
||||
|
Loading…
x
Reference in New Issue
Block a user