Improve Backend
This commit is contained in:
@ -66,7 +66,7 @@ AND accounts.budget_id = $1;
|
||||
-- name: GetFilteredTransactions :many
|
||||
SELECT transactions.*
|
||||
FROM display_transactions AS transactions
|
||||
WHERE (@filter_category::boolean OR transactions.category_id = @category_id)
|
||||
AND (@filter_account::boolean OR transactions.account_id = @account_id)
|
||||
AND (@filter_payee::boolean OR transactions.payee_id = @payee_id)
|
||||
WHERE (NOT @filter_category::boolean OR transactions.category_id = @category_id)
|
||||
AND (NOT @filter_account::boolean OR transactions.account_id = @account_id)
|
||||
AND (NOT @filter_payee::boolean OR transactions.payee_id = @payee_id)
|
||||
AND transactions.budget_id = @budget_id;
|
Reference in New Issue
Block a user