mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Code for #989
This commit is contained in:
parent
f59135a9ca
commit
435694e9ea
@ -316,6 +316,7 @@ class AccountController extends Controller
|
|||||||
// prep for "specific date" view.
|
// prep for "specific date" view.
|
||||||
if (strlen($moment) > 0 && 'all' !== $moment) {
|
if (strlen($moment) > 0 && 'all' !== $moment) {
|
||||||
$start = new Carbon($moment);
|
$start = new Carbon($moment);
|
||||||
|
$start = app('navigation')->startOfPeriod($start, $range);
|
||||||
$end = app('navigation')->endOfPeriod($start, $range);
|
$end = app('navigation')->endOfPeriod($start, $range);
|
||||||
$fStart = $start->formatLocalized($this->monthAndDayFormat);
|
$fStart = $start->formatLocalized($this->monthAndDayFormat);
|
||||||
$fEnd = $end->formatLocalized($this->monthAndDayFormat);
|
$fEnd = $end->formatLocalized($this->monthAndDayFormat);
|
||||||
@ -470,7 +471,7 @@ class AccountController extends Controller
|
|||||||
->withOpposingAccount();
|
->withOpposingAccount();
|
||||||
$spent = strval($collector->getJournals()->sum('transaction_amount'));
|
$spent = strval($collector->getJournals()->sum('transaction_amount'));
|
||||||
|
|
||||||
$dateStr = $date['start']->format('Y-m-d');
|
$dateStr = $date['end']->format('Y-m-d');
|
||||||
$dateName = app('navigation')->periodShow($date['start'], $date['period']);
|
$dateName = app('navigation')->periodShow($date['start'], $date['period']);
|
||||||
$entries->push(
|
$entries->push(
|
||||||
[
|
[
|
||||||
@ -478,7 +479,7 @@ class AccountController extends Controller
|
|||||||
'name' => $dateName,
|
'name' => $dateName,
|
||||||
'spent' => $spent,
|
'spent' => $spent,
|
||||||
'earned' => $earned,
|
'earned' => $earned,
|
||||||
'date' => clone $date['start'],]
|
'date' => clone $date['end'],]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -126,7 +126,7 @@
|
|||||||
<div class="col-lg-2 col-md-4 col-sm-12 col-xs-12">
|
<div class="col-lg-2 col-md-4 col-sm-12 col-xs-12">
|
||||||
{% for period in periods %}
|
{% for period in periods %}
|
||||||
{% if (period.spent != 0 or period.earned != 0) %}
|
{% if (period.spent != 0 or period.earned != 0) %}
|
||||||
<div class="box {% if period.date == start %}box-solid box-primary{% endif %}">
|
<div class="box {% if period.date == end %}box-solid box-primary{% endif %}">
|
||||||
<div class="box-header with-border">
|
<div class="box-header with-border">
|
||||||
<h3 class="box-title"><a href="{{ route('accounts.show',[account.id,period.string]) }}">{{ period.name }}</a>
|
<h3 class="box-title"><a href="{{ route('accounts.show',[account.id,period.string]) }}">{{ period.name }}</a>
|
||||||
</h3>
|
</h3>
|
||||||
|
Loading…
Reference in New Issue
Block a user