Skip to content

Firefly III: a personal finances manager

Fix https://github.com/firefly-iii/firefly-iii/issues/12309

James Cole377123d41f66
diff --git a/app/Events/Model/TransactionGroup/TransactionGroupEventObjects.php b/app/Events/Model/TransactionGroup/TransactionGroupEventObjects.php
index 907395c78b..47331fdbe9 100644
--- a/app/Events/Model/TransactionGroup/TransactionGroupEventObjects.php
+++ b/app/Events/Model/TransactionGroup/TransactionGroupEventObjects.php
@@ -53,8 +53,9 @@ class TransactionGroupEventObjects
/** @var TransactionJournal $journal */
foreach ($transactionGroup->transactionJournals as $journal) {
- Log::debug(sprintf('Appended transaction journal #%d', $journal->id));
- $this->transactionJournals->push($journal);
+ $journal->refresh();
+ Log::debug(sprintf('Appended transaction journal #%d (%s)', $journal->id, $journal->date->format('Y-m-d H:i:s')));
+ $this->transactionJournals->put($journal->id, $journal);
$this->budgets = $this->budgets->merge($journal->budgets);
$this->categories = $this->categories->merge($journal->categories);
$this->tags = $this->tags->merge($journal->tags);
diff --git a/app/Http/Controllers/Account/ShowController.php b/app/Http/Controllers/Account/ShowController.php
index 7565dbb9a8..ac28b4b4e7 100644
--- a/app/Http/Controllers/Account/ShowController.php
+++ b/app/Http/Controllers/Account/ShowController.php
@@ -140,10 +140,6 @@ final class ShowController extends Controller
Log::debug('End period overview');
$timer->stop('period-overview');
- // if layout = v2, overrule the page title.
- if ('v1' !== config('view.layout')) {
- $subTitle = (string) trans('firefly.all_journals_for_account', ['name' => $account->name]);
- }
Log::debug('Collect transactions');
$timer->start('collection');
diff --git a/app/Services/Internal/Update/GroupCloneService.php b/app/Services/Internal/Update/GroupCloneService.php
index da02258fc0..0a4155bd5f 100644
--- a/app/Services/Internal/Update/GroupCloneService.php
+++ b/app/Services/Internal/Update/GroupCloneService.php
@@ -52,7 +52,7 @@ class GroupCloneService
foreach ($group->transactionJournals as $journal) {
$this->cloneJournal($journal, $newGroup, $group->id);
}
-
+ $group->refresh();
// event!
$flags = new TransactionGroupEventFlags();
$objects = TransactionGroupEventObjects::collectFromTransactionGroup($newGroup);
diff --git a/resources/views/accounts/show.twig b/resources/views/accounts/show.twig
index d552600cf9..b024ab2fc0 100644
--- a/resources/views/accounts/show.twig
+++ b/resources/views/accounts/show.twig
@@ -12,13 +12,17 @@
<div class="box-header with-border">
<h3 class="box-title">
{% if balances.balance %}
+ <span title="balance">
{{ trans('firefly.chart_account_in_period', {
balance: formatAmountBySymbol(balances.balance, currency.symbol, currency.decimal_places, true),
name: account.name|escape, start: start.isoFormat(monthAndDayFormat), end: end.isoFormat(monthAndDayFormat) })|raw }}
+ </span>
{% elseif balances.pc_balance %}
+ <span title="pc_balance">
{{ trans('firefly.chart_account_in_period', {
balance: formatAmountBySymbol(balances.pc_balance, primaryCurrency.symbol, primaryCurrency.decimal_places, true),
name: account.name|escape, start: start.isoFormat(monthAndDayFormat), end: end.isoFormat(monthAndDayFormat) })|raw }}
+ </span>
{% endif %}
</h3>
<div class="box-tools pull-right">