Skip to content

Commit

Permalink
Merge pull request #18 from dsaltares/fix/update-account-balance
Browse files Browse the repository at this point in the history
fix: account balance not updating correctly
  • Loading branch information
dsaltares authored Oct 1, 2024
2 parents aad917a + 15412a1 commit 57194a7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/scripts/generateDemoData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -505,6 +505,7 @@ async function updateAccountBalance(accountId: number) {
.selectFrom('accountTransaction')
.select('amount')
.where('accountId', '=', accountId)
.where('deletedAt', 'is', null)
.execute();
return db
.updateTable('bankAccount')
Expand Down
1 change: 1 addition & 0 deletions src/server/transactions/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export async function updateAccountBalance(accountId: number) {
.selectFrom('accountTransaction')
.select('amount')
.where('accountId', '=', accountId)
.where('deletedAt', 'is', null)
.execute();
return db
.updateTable('bankAccount')
Expand Down

0 comments on commit 57194a7

Please sign in to comment.