This commit is contained in:
James Cole
2019-12-30 14:41:16 +01:00
parent 29e2c32474
commit 56700ef984
3 changed files with 13 additions and 8 deletions

View File

@@ -123,12 +123,13 @@ class ShowController extends Controller
$groups = $collector->getPaginatedGroups();
$groups->setPath(route('accounts.show', [$account->id, $start->format('Y-m-d'), $end->format('Y-m-d')]));
$showAll = false;
$balance = app('steam')->balance($account, $end);
return view(
'accounts.show',
compact(
'account', 'showAll', 'objectType', 'currency', 'today', 'periods', 'subTitleIcon', 'groups', 'subTitle', 'start', 'end',
'chartUri', 'location'
'chartUri', 'location','balance'
)
);
}
@@ -147,6 +148,7 @@ class ShowController extends Controller
return $this->redirectAccountToAccount($account); // @codeCoverageIgnore
}
$location = $this->repository->getLocation($account);
$isLiability = $this->repository->isLiability($account);
$objectType = config(sprintf('firefly.shortNamesByFullName.%s', $account->accountType->type));
@@ -166,12 +168,13 @@ class ShowController extends Controller
$groups->setPath(route('accounts.show.all', [$account->id]));
$chartUri = route('chart.account.period', [$account->id, $start->format('Y-m-d'), $end->format('Y-m-d')]);
$showAll = true;
$balance = app('steam')->balance($account, $end);
return view(
'accounts.show',
compact(
'account', 'showAll', 'location', 'objectType', 'isLiability', 'currency', 'today',
'chartUri', 'periods', 'subTitleIcon', 'groups', 'subTitle', 'start', 'end'
'chartUri', 'periods', 'subTitleIcon', 'groups', 'subTitle', 'start', 'end', 'balance'
)
);
}

View File

@@ -138,7 +138,7 @@ return [
'budget_in_period' => 'All transactions for budget ":name" between :start and :end in :currency',
'chart_budget_in_period' => 'Chart for all transactions for budget ":name" between :start and :end in :currency',
'chart_budget_in_period_only_currency' => 'The amount you budgeted was in :currency, so this chart will only show transactions in :currency.',
'chart_account_in_period' => 'Chart for all transactions for account ":name" between :start and :end',
'chart_account_in_period' => 'Chart for all transactions for account ":name" (:balance) between :start and :end',
'chart_category_in_period' => 'Chart for all transactions for category ":name" between :start and :end',
'chart_category_all' => 'Chart for all transactions for category ":name"',
'clone_withdrawal' => 'Clone this withdrawal',

View File

@@ -11,7 +11,9 @@
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">
{{ trans('firefly.chart_account_in_period', {name: account.name, start: start.formatLocalized(monthAndDayFormat), end: end.formatLocalized(monthAndDayFormat) }) }}
{{ trans('firefly.chart_account_in_period', {
balance: formatAmountBySymbol(balance, currency.symbol, currency.decimal_places, true),
name: account.name, start: start.formatLocalized(monthAndDayFormat), end: end.formatLocalized(monthAndDayFormat) })|raw }}
</h3>
<div class="box-tools pull-right">
<div class="btn-group">
@@ -87,18 +89,18 @@
{% endif %}
<div class="row">
{% if(location) %}
<div class="col-lg-6">
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ 'location'|_ }}</h3>
</div>
<div class="box-body">
{% if(location) %}
<div id="location_map" style="width:100%;height:300px;"></div>
{% endif %}
<div id="location_map" style="width:100%;height:300px;"></div>
</div>
</div>
</div>
{% endif %}
{% if account.notes.count == 1 %}
<div class="col-lg-6">
<div class="box">
@@ -117,7 +119,7 @@
<div class="{% if periods|length > 0 %}col-lg-10 col-md-8 col-sm-12{% else %}col-lg-12 col-md-12 col-sm-12{% endif %}">
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ 'transactions'|_ }}</h3>
<h3 class="box-title">{{ 'transactions'|_ }} ({{ formatAmountBySymbol(balance, currency.symbol, currency.decimal_places, true)|raw }})</h3>
</div>
<div class="box-body">
{% if account.accountType.type == 'Asset account' %}