Skip to content

Firefly III: a personal finances manager

Fix #2603

James Coleef85b1180fd4
diff --git a/app/Support/Binder/AccountList.php b/app/Support/Binder/AccountList.php
index a64b0c43b4..5700423bfc 100644
--- a/app/Support/Binder/AccountList.php
+++ b/app/Support/Binder/AccountList.php
@@ -55,8 +55,8 @@ class AccountList implements BinderInterface
->where('account_types.type', AccountType::ASSET)
->orderBy('accounts.name', 'ASC')
->get(['accounts.*']);
- //Log::debug(sprintf('Collection length is %d', $collection->count()));
}
+
if ('allAssetAccounts' !== $value) {
$incoming = array_map('\intval', explode(',', $value));
$list = array_merge(array_unique($incoming), [0]);
diff --git a/app/Support/Binder/BudgetList.php b/app/Support/Binder/BudgetList.php
index d846318390..ca816d6aca 100644
--- a/app/Support/Binder/BudgetList.php
+++ b/app/Support/Binder/BudgetList.php
@@ -43,8 +43,15 @@ class BudgetList implements BinderInterface
*/
public static function routeBinder(string $value, Route $route): Collection
{
- //Log::debug(sprintf('Now in BudgetList::routeBinder("%s")', $value));
if (auth()->check()) {
+
+ if ('allBudgets' === $value) {
+ return auth()->user()->budgets()->where('active', 1)
+ ->orderBy('order', 'ASC')
+ ->orderBy('name', 'ASC')
+ ->get();
+ }
+
$list = array_unique(array_map('\intval', explode(',', $value)));
// @codeCoverageIgnoreStart
diff --git a/app/Support/Binder/CategoryList.php b/app/Support/Binder/CategoryList.php
index c68d75823d..df3ab03cf4 100644
--- a/app/Support/Binder/CategoryList.php
+++ b/app/Support/Binder/CategoryList.php
@@ -43,6 +43,12 @@ class CategoryList implements BinderInterface
public static function routeBinder(string $value, Route $route): Collection
{
if (auth()->check()) {
+ if ('allCategories' === $value) {
+ return auth()->user()->categories()
+ ->orderBy('name', 'ASC')
+ ->get();
+ }
+
$list = array_unique(array_map('\intval', explode(',', $value)));
if (0 === count($list)) {
throw new NotFoundHttpException; // @codeCoverageIgnore
diff --git a/app/Support/Binder/TagList.php b/app/Support/Binder/TagList.php
index 62d64dd568..707576041a 100644
--- a/app/Support/Binder/TagList.php
+++ b/app/Support/Binder/TagList.php
@@ -44,6 +44,14 @@ class TagList implements BinderInterface
public static function routeBinder(string $value, Route $route): Collection
{
if (auth()->check()) {
+
+ if ('allTags' === $value) {
+ return auth()->user()->tags()
+ ->orderBy('tag', 'ASC')
+ ->get();
+ }
+
+
$list = array_unique(array_map('\strtolower', explode(',', $value)));
Log::debug('List of tags is', $list);
// @codeCoverageIgnoreStart