Skip to content

Fix interest query sign#222

Merged
mxr merged 1 commit into
mainfrom
fix-interest-sign
May 24, 2026
Merged

Fix interest query sign#222
mxr merged 1 commit into
mainfrom
fix-interest-sign

Conversation

@mxr
Copy link
Copy Markdown
Owner

@mxr mxr commented May 24, 2026

Problem

Interest is recorded as inflows (positive amount_currency). The query negated the amount, so per-account totals were negative. They failed the HAVING total >= threshold filter, so reported interest fell back to $0.

Solution

Sum amount_currency directly instead of negating it.

🤖 Generated with Claude Code

Interest is recorded as inflows (positive amount_currency), but the
query negated the amount, so totals were negative and failed the
HAVING threshold, yielding $0. Use SUM(amount_currency).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@mxr mxr enabled auto-merge (squash) May 24, 2026 11:21
@mxr mxr merged commit 8aca221 into main May 24, 2026
6 of 7 checks passed
@mxr mxr deleted the fix-interest-sign branch May 24, 2026 11:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant