Add budgetID param
This commit is contained in:
		| @@ -60,4 +60,5 @@ LEFT JOIn accounts AS otherGroupAccount | ||||
|         ON otherGroupTransaction.account_id = accounts.id | ||||
| WHERE transactions.category_id IS NULL | ||||
| AND accounts.on_budget | ||||
| AND (otherGroupAccount.id IS NULL OR NOT otherGroupAccount.on_budget); | ||||
| AND (otherGroupAccount.id IS NULL OR NOT otherGroupAccount.on_budget) | ||||
| AND accounts.budget_id = $1; | ||||
| @@ -132,6 +132,7 @@ 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 | ||||
| ` | ||||
|  | ||||
| type GetProblematicTransactionsRow struct { | ||||
| @@ -167,8 +168,8 @@ type GetProblematicTransactionsRow struct { | ||||
| 	LastReconciled_2 sql.NullTime | ||||
| } | ||||
|  | ||||
| func (q *Queries) GetProblematicTransactions(ctx context.Context) ([]GetProblematicTransactionsRow, error) { | ||||
| 	rows, err := q.db.QueryContext(ctx, getProblematicTransactions) | ||||
| func (q *Queries) GetProblematicTransactions(ctx context.Context, budgetID uuid.UUID) ([]GetProblematicTransactionsRow, error) { | ||||
| 	rows, err := q.db.QueryContext(ctx, getProblematicTransactions, budgetID) | ||||
| 	if err != nil { | ||||
| 		return nil, err | ||||
| 	} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user