Merge branch 'master' of github.com:akaunting/akaunting
This commit is contained in:
commit
d066938972
@ -150,9 +150,10 @@ class ExpenseSummary extends Controller
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
$date = Date::parse($item->$date_field)->format('F');
|
$month = Date::parse($item->$date_field)->format('F');
|
||||||
|
$month_year = Date::parse($item->$date_field)->format('F-Y');
|
||||||
|
|
||||||
if (!isset($expenses[$item->category_id])) {
|
if (!isset($expenses[$item->category_id]) || !isset($expenses[$item->category_id][$month]) || !isset($graph[$month_year])) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -165,13 +166,13 @@ class ExpenseSummary extends Controller
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$expenses[$item->category_id][$date]['amount'] += $amount;
|
$expenses[$item->category_id][$month]['amount'] += $amount;
|
||||||
$expenses[$item->category_id][$date]['currency_code'] = $item->currency_code;
|
$expenses[$item->category_id][$month]['currency_code'] = $item->currency_code;
|
||||||
$expenses[$item->category_id][$date]['currency_rate'] = $item->currency_rate;
|
$expenses[$item->category_id][$month]['currency_rate'] = $item->currency_rate;
|
||||||
|
|
||||||
$graph[Date::parse($item->$date_field)->format('F-Y')] += $amount;
|
$graph[$month_year] += $amount;
|
||||||
|
|
||||||
$totals[$date]['amount'] += $amount;
|
$totals[$month]['amount'] += $amount;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -209,11 +209,12 @@ class IncomeExpenseSummary extends Controller
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
$date = Date::parse($item->$date_field)->format('F');
|
$month = Date::parse($item->$date_field)->format('F');
|
||||||
|
$month_year = Date::parse($item->$date_field)->format('F-Y');
|
||||||
|
|
||||||
$group = (($type == 'invoice') || ($type == 'revenue')) ? 'income' : 'expense';
|
$group = (($type == 'invoice') || ($type == 'revenue')) ? 'income' : 'expense';
|
||||||
|
|
||||||
if (!isset($compares[$group][$item->category_id])) {
|
if (!isset($compares[$group][$item->category_id]) || !isset($compares[$group][$item->category_id][$month]) || !isset($graph[$month_year])) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -226,18 +227,18 @@ class IncomeExpenseSummary extends Controller
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$compares[$group][$item->category_id][$date]['amount'] += $amount;
|
$compares[$group][$item->category_id][$month]['amount'] += $amount;
|
||||||
$compares[$group][$item->category_id][$date]['currency_code'] = $item->currency_code;
|
$compares[$group][$item->category_id][$month]['currency_code'] = $item->currency_code;
|
||||||
$compares[$group][$item->category_id][$date]['currency_rate'] = $item->currency_rate;
|
$compares[$group][$item->category_id][$month]['currency_rate'] = $item->currency_rate;
|
||||||
|
|
||||||
if ($group == 'income') {
|
if ($group == 'income') {
|
||||||
$graph[Date::parse($item->$date_field)->format('F-Y')] += $amount;
|
$graph[$month_year] += $amount;
|
||||||
|
|
||||||
$totals[$date]['amount'] += $amount;
|
$totals[$month]['amount'] += $amount;
|
||||||
} else {
|
} else {
|
||||||
$graph[Date::parse($item->$date_field)->format('F-Y')] -= $amount;
|
$graph[$month_year] -= $amount;
|
||||||
|
|
||||||
$totals[$date]['amount'] -= $amount;
|
$totals[$month]['amount'] -= $amount;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -150,9 +150,10 @@ class IncomeSummary extends Controller
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
$date = Date::parse($item->$date_field)->format('F');
|
$month = Date::parse($item->$date_field)->format('F');
|
||||||
|
$month_year = Date::parse($item->$date_field)->format('F-Y');
|
||||||
|
|
||||||
if (!isset($incomes[$item->category_id])) {
|
if (!isset($incomes[$item->category_id]) || !isset($incomes[$item->category_id][$month]) || !isset($graph[$month_year])) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -165,13 +166,13 @@ class IncomeSummary extends Controller
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$incomes[$item->category_id][$date]['amount'] += $amount;
|
$incomes[$item->category_id][$month]['amount'] += $amount;
|
||||||
$incomes[$item->category_id][$date]['currency_code'] = $item->currency_code;
|
$incomes[$item->category_id][$month]['currency_code'] = $item->currency_code;
|
||||||
$incomes[$item->category_id][$date]['currency_rate'] = $item->currency_rate;
|
$incomes[$item->category_id][$month]['currency_rate'] = $item->currency_rate;
|
||||||
|
|
||||||
$graph[Date::parse($item->$date_field)->format('F-Y')] += $amount;
|
$graph[$month_year] += $amount;
|
||||||
|
|
||||||
$totals[$date]['amount'] += $amount;
|
$totals[$month]['amount'] += $amount;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
<div class="box-header with-border">
|
<div class="box-header with-border">
|
||||||
{!! Form::open(['url' => 'reports/expense-summary', 'role' => 'form', 'method' => 'GET']) !!}
|
{!! Form::open(['url' => 'reports/expense-summary', 'role' => 'form', 'method' => 'GET']) !!}
|
||||||
<div id="items" class="pull-left box-filter">
|
<div id="items" class="pull-left box-filter">
|
||||||
{!! Form::select('year', $years, request('year', $this_year), ['class' => 'form-control input-filter input-sm', 'onchange' => 'this.form.submit()']) !!}
|
{!! Form::select('year', $years, request('year', $this_year), ['class' => 'form-control input-filter input-sm']) !!}
|
||||||
{!! Form::select('status', $statuses, request('status'), ['class' => 'form-control input-filter input-sm']) !!}
|
{!! Form::select('status', $statuses, request('status'), ['class' => 'form-control input-filter input-sm']) !!}
|
||||||
{!! Form::select('accounts[]', $accounts, request('accounts'), ['id' => 'filter-accounts', 'class' => 'form-control input-filter input-lg', 'multiple' => 'multiple']) !!}
|
{!! Form::select('accounts[]', $accounts, request('accounts'), ['id' => 'filter-accounts', 'class' => 'form-control input-filter input-lg', 'multiple' => 'multiple']) !!}
|
||||||
{!! Form::select('vendors[]', $vendors, request('vendors'), ['id' => 'filter-vendors', 'class' => 'form-control input-filter input-lg', 'multiple' => 'multiple']) !!}
|
{!! Form::select('vendors[]', $vendors, request('vendors'), ['id' => 'filter-vendors', 'class' => 'form-control input-filter input-lg', 'multiple' => 'multiple']) !!}
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
<div class="box-header with-border">
|
<div class="box-header with-border">
|
||||||
{!! Form::open(['url' => 'reports/income-expense-summary', 'role' => 'form', 'method' => 'GET']) !!}
|
{!! Form::open(['url' => 'reports/income-expense-summary', 'role' => 'form', 'method' => 'GET']) !!}
|
||||||
<div id="items" class="pull-left box-filter">
|
<div id="items" class="pull-left box-filter">
|
||||||
{!! Form::select('year', $years, request('year', $this_year), ['class' => 'form-control input-filter input-sm', 'onchange' => 'this.form.submit()']) !!}
|
{!! Form::select('year', $years, request('year', $this_year), ['class' => 'form-control input-filter input-sm']) !!}
|
||||||
{!! Form::select('status', $statuses, request('status'), ['class' => 'form-control input-filter input-sm']) !!}
|
{!! Form::select('status', $statuses, request('status'), ['class' => 'form-control input-filter input-sm']) !!}
|
||||||
{!! Form::select('accounts[]', $accounts, request('accounts'), ['id' => 'filter-accounts', 'class' => 'form-control input-filter', 'multiple' => 'multiple']) !!}
|
{!! Form::select('accounts[]', $accounts, request('accounts'), ['id' => 'filter-accounts', 'class' => 'form-control input-filter', 'multiple' => 'multiple']) !!}
|
||||||
{!! Form::select('customers[]', $customers, request('customers'), ['id' => 'filter-customers', 'class' => 'form-control input-filter', 'multiple' => 'multiple']) !!}
|
{!! Form::select('customers[]', $customers, request('customers'), ['id' => 'filter-customers', 'class' => 'form-control input-filter', 'multiple' => 'multiple']) !!}
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
<div class="box-header with-border">
|
<div class="box-header with-border">
|
||||||
{!! Form::open(['url' => 'reports/income-summary', 'role' => 'form', 'method' => 'GET']) !!}
|
{!! Form::open(['url' => 'reports/income-summary', 'role' => 'form', 'method' => 'GET']) !!}
|
||||||
<div id="items" class="pull-left box-filter">
|
<div id="items" class="pull-left box-filter">
|
||||||
{!! Form::select('year', $years, request('year', $this_year), ['class' => 'form-control input-filter input-sm', 'onchange' => 'this.form.submit()']) !!}
|
{!! Form::select('year', $years, request('year', $this_year), ['class' => 'form-control input-filter input-sm']) !!}
|
||||||
{!! Form::select('status', $statuses, request('status'), ['class' => 'form-control input-filter input-sm']) !!}
|
{!! Form::select('status', $statuses, request('status'), ['class' => 'form-control input-filter input-sm']) !!}
|
||||||
{!! Form::select('accounts[]', $accounts, request('accounts'), ['id' => 'filter-accounts', 'class' => 'form-control input-filter input-lg', 'multiple' => 'multiple']) !!}
|
{!! Form::select('accounts[]', $accounts, request('accounts'), ['id' => 'filter-accounts', 'class' => 'form-control input-filter input-lg', 'multiple' => 'multiple']) !!}
|
||||||
{!! Form::select('customers[]', $customers, request('customers'), ['id' => 'filter-customers', 'class' => 'form-control input-filter input-lg', 'multiple' => 'multiple']) !!}
|
{!! Form::select('customers[]', $customers, request('customers'), ['id' => 'filter-customers', 'class' => 'form-control input-filter input-lg', 'multiple' => 'multiple']) !!}
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
<div class="box-header with-border">
|
<div class="box-header with-border">
|
||||||
{!! Form::open(['url' => 'reports/profit-loss', 'role' => 'form', 'method' => 'GET']) !!}
|
{!! Form::open(['url' => 'reports/profit-loss', 'role' => 'form', 'method' => 'GET']) !!}
|
||||||
<div id="items" class="pull-left" style="margin-left: 5px">
|
<div id="items" class="pull-left" style="margin-left: 5px">
|
||||||
{!! Form::select('year', $years, request('year', $this_year), ['class' => 'form-control input-filter input-sm', 'onchange' => 'this.form.submit()']) !!}
|
{!! Form::select('year', $years, request('year', $this_year), ['class' => 'form-control input-filter input-sm']) !!}
|
||||||
{!! Form::select('status', $statuses, request('status'), ['class' => 'form-control input-filter input-sm']) !!}
|
{!! Form::select('status', $statuses, request('status'), ['class' => 'form-control input-filter input-sm']) !!}
|
||||||
{!! Form::button('<span class="fa fa-filter"></span> ' . trans('general.filter'), ['type' => 'submit', 'class' => 'btn btn-sm btn-default btn-filter']) !!}
|
{!! Form::button('<span class="fa fa-filter"></span> ' . trans('general.filter'), ['type' => 'submit', 'class' => 'btn btn-sm btn-default btn-filter']) !!}
|
||||||
</div>
|
</div>
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
<div class="box-header with-border">
|
<div class="box-header with-border">
|
||||||
{!! Form::open(['url' => 'reports/tax-summary', 'role' => 'form', 'method' => 'GET']) !!}
|
{!! Form::open(['url' => 'reports/tax-summary', 'role' => 'form', 'method' => 'GET']) !!}
|
||||||
<div id="items" class="pull-left" style="margin-left: 5px">
|
<div id="items" class="pull-left" style="margin-left: 5px">
|
||||||
{!! Form::select('year', $years, request('year', $this_year), ['class' => 'form-control input-filter input-sm', 'onchange' => 'this.form.submit()']) !!}
|
{!! Form::select('year', $years, request('year', $this_year), ['class' => 'form-control input-filter input-sm']) !!}
|
||||||
{!! Form::select('status', $statuses, request('status'), ['class' => 'form-control input-filter input-sm']) !!}
|
{!! Form::select('status', $statuses, request('status'), ['class' => 'form-control input-filter input-sm']) !!}
|
||||||
{!! Form::button('<span class="fa fa-filter"></span> ' . trans('general.filter'), ['type' => 'submit', 'class' => 'btn btn-sm btn-default btn-filter']) !!}
|
{!! Form::button('<span class="fa fa-filter"></span> ' . trans('general.filter'), ['type' => 'submit', 'class' => 'btn btn-sm btn-default btn-filter']) !!}
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user