Implement backend
This commit is contained in:
@ -61,4 +61,12 @@ LEFT JOIn accounts AS otherGroupAccount
|
||||
WHERE transactions.category_id IS NULL
|
||||
AND accounts.on_budget
|
||||
AND (otherGroupAccount.id IS NULL OR NOT otherGroupAccount.on_budget)
|
||||
AND accounts.budget_id = $1;
|
||||
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)
|
||||
AND transactions.budget_id = @budget_id;
|
Reference in New Issue
Block a user