filter option for the recurring documents and transactions added #1pbthq3

This commit is contained in:
Sevan Nerse 2021-11-02 16:04:01 +03:00
parent 020439619b
commit 61923a08d8
3 changed files with 42 additions and 6 deletions

View File

@ -89,12 +89,12 @@ class SearchString extends Component
$column = $options['key']; $column = $options['key'];
} }
if (isset($options['relationship'])) { if (isset($options['relationship']) && isset($options['foreign_key']) && !empty($options['foreign_key'])) {
if (isset($options['foreign_key'])) {
$column .= '.' . $options['foreign_key']; $column .= '.' . $options['foreign_key'];
} else {
$column .= '.id';
} }
if (isset($options['relationship']) && !isset($options['foreign_key'])) {
$column .= '.id';
} }
return $column; return $column;

View File

@ -112,6 +112,12 @@ return [
'route' => 'categories.index' 'route' => 'categories.index'
], ],
'parent_id', 'parent_id',
'recurring' => [
'key' => 'recurring',
'foreign_key' => '',
'relationship' => true,
'boolean' => true,
]
], ],
], ],
@ -205,6 +211,11 @@ return [
'route' => 'categories.index' 'route' => 'categories.index'
], ],
'parent_id', 'parent_id',
'recurring' => [
'key' => 'recurring',
'relationship' => true,
'boolean' => true,
]
], ],
], ],
@ -243,6 +254,12 @@ return [
'route' => ['categories.index', 'search=type:expense'] 'route' => ['categories.index', 'search=type:expense']
], ],
'parent_id', 'parent_id',
'recurring' => [
'key' => 'recurring',
'foreign_key' => '',
'relationship' => true,
'boolean' => true,
]
], ],
], ],
@ -269,6 +286,12 @@ return [
'route' => ['categories.index', 'search=type:expense'] 'route' => ['categories.index', 'search=type:expense']
], ],
'parent_id', 'parent_id',
'recurring' => [
'key' => 'recurring',
'foreign_key' => '',
'relationship' => true,
'boolean' => true,
]
], ],
], ],
@ -308,6 +331,12 @@ return [
'route' => ['categories.index', 'search=type:income'] 'route' => ['categories.index', 'search=type:income']
], ],
'parent_id', 'parent_id',
'recurring' => [
'key' => 'recurring',
'foreign_key' => '',
'relationship' => true,
'boolean' => true,
]
], ],
], ],
@ -334,6 +363,12 @@ return [
'route' => ['categories.index', 'search=type:income'] 'route' => ['categories.index', 'search=type:income']
], ],
'parent_id', 'parent_id',
'recurring' => [
'key' => 'recurring',
'foreign_key' => '',
'relationship' => true,
'boolean' => true,
]
], ],
], ],

View File

@ -15,6 +15,7 @@ return [
'reconciled' => 'Reconciled', 'reconciled' => 'Reconciled',
'expense_account' => 'From Account', 'expense_account' => 'From Account',
'income_account' => 'To Account', 'income_account' => 'To Account',
'recurring' => 'Recurring',
], ],
]; ];