From 833432025faa64ca160e9eb84f336c77c266e335 Mon Sep 17 00:00:00 2001 From: Sander Dorigo Date: Fri, 14 Aug 2026 11:07:59 +0200 Subject: [PATCH 1/3] Fix https://github.com/orgs/firefly-iii/discussions/12583 --- .../Collector/Extensions/AmountCollection.php | 18 ++++++++++++++++++ .../Collector/GroupCollectorInterface.php | 3 +++ app/Support/Search/OperatorQuerySearch.php | 7 ++++++- config/search.php | 1 + 4 files changed, 28 insertions(+), 1 deletion(-) diff --git a/app/Helpers/Collector/Extensions/AmountCollection.php b/app/Helpers/Collector/Extensions/AmountCollection.php index ecaf44c986..a420ed7ca9 100644 --- a/app/Helpers/Collector/Extensions/AmountCollection.php +++ b/app/Helpers/Collector/Extensions/AmountCollection.php @@ -104,6 +104,24 @@ trait AmountCollection return $this; } + public function hasForeignCurrencyId(): GroupCollectorInterface + { + $this->query->where(static function (EloquentBuilder $q): void { + $q->whereNotNull('source.foreign_currency_id'); + }); + + return $this; + } + + public function hasNoForeignCurrencyId(): GroupCollectorInterface + { + $this->query->where(static function (EloquentBuilder $q): void { + $q->whereNull('source.foreign_currency_id'); + }); + + return $this; + } + /** * Get transactions where the amount is less than. */ diff --git a/app/Helpers/Collector/GroupCollectorInterface.php b/app/Helpers/Collector/GroupCollectorInterface.php index c8f0d8cde7..be83a19dd9 100644 --- a/app/Helpers/Collector/GroupCollectorInterface.php +++ b/app/Helpers/Collector/GroupCollectorInterface.php @@ -182,6 +182,9 @@ interface GroupCollectorInterface */ public function excludeForeignCurrency(TransactionCurrency $currency): self; + public function hasForeignCurrencyId(): self; + public function hasNoForeignCurrencyId(): self; + /** * Limit the result to NOT a set of specific transaction groups. */ diff --git a/app/Support/Search/OperatorQuerySearch.php b/app/Support/Search/OperatorQuerySearch.php index 78ec7afef7..f444510f09 100644 --- a/app/Support/Search/OperatorQuerySearch.php +++ b/app/Support/Search/OperatorQuerySearch.php @@ -2397,7 +2397,12 @@ class OperatorQuerySearch implements SearchInterface $this->collector->foreignAmountIsNot($amount); break; - + case 'has_foreign_amount': + $this->collector->hasForeignCurrencyId(); + break; + case '-has_foreign_amount': + $this->collector->hasNoForeignCurrencyId(); + break; case '-amount_more': case 'amount_less': // strip comma's, make dots. diff --git a/config/search.php b/config/search.php index 05bd7eb0f1..6374b2cd86 100644 --- a/config/search.php +++ b/config/search.php @@ -154,6 +154,7 @@ return [ 'account_is_cash' => ['alias' => false, 'needs_context' => false], 'currency_is' => ['alias' => false, 'needs_context' => true], 'foreign_currency_is' => ['alias' => false, 'needs_context' => true], + 'has_foreign_amount' => ['alias' => false, 'needs_context' => false], 'id' => ['alias' => false, 'trigger_class' => '', 'needs_context' => true], 'journal_id' => ['alias' => false, 'trigger_class' => '', 'needs_context' => true], 'recurrence_id' => ['alias' => false, 'trigger_class' => '', 'needs_context' => true], From 8d05156b6d952cf85c986466e5b7dce868f302a2 Mon Sep 17 00:00:00 2001 From: Sander Dorigo Date: Fri, 14 Aug 2026 12:47:24 +0200 Subject: [PATCH 2/3] Fix https://github.com/firefly-iii/firefly-iii/issues/12608 --- resources/assets/v3/sass/app.scss | 9 +++++++++ resources/views/components/layout/sidebar.blade.php | 8 +++++++- resources/views/layout/v3/session.blade.php | 2 +- 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/resources/assets/v3/sass/app.scss b/resources/assets/v3/sass/app.scss index fe8873b441..f347bd8812 100644 --- a/resources/assets/v3/sass/app.scss +++ b/resources/assets/v3/sass/app.scss @@ -73,8 +73,17 @@ html[data-bs-theme="dark"] .money-transfer { // custom Firefly III CSS .general-chart-error { height: 30px; + // TODO move picutre background: url('/v1/images/error.png') no-repeat center center; } + +// hide search. +body.sidebar-collapse .search-xl {display:none;} +body.sidebar-collapse .search-xs {display:block !important;} +// show search + +ul.nav:nth-child(1) > li:nth-child(2) + .piggy-handle { cursor: move; } diff --git a/resources/views/components/layout/sidebar.blade.php b/resources/views/components/layout/sidebar.blade.php index 3b10f3be9f..3e3fb9eab4 100644 --- a/resources/views/components/layout/sidebar.blade.php +++ b/resources/views/components/layout/sidebar.blade.php @@ -7,7 +7,7 @@ id="navigation" x-data="sidebar" > - +