Improve Backend

This commit is contained in:
jacob1123 authored and Gitea committed 2022-08-21 21:32:49 +02:00
1 parent fdb64b2000
commit 94b5c4bbd3
4 files changed
+26 -10

No files matched your search

+3 -3
View File
@@ -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;