fix(bank-tx): count bank account fee bookings in the monthly bank cost#4216
Merged
Conversation
Collaborator
Author
|
Two review passes (conventions + correctness) until both tracks came back clean. The first pass surfaced one design issue worth noting: the new fail-loud price conversion ran inside the every-minute log job whose outer catch arms the safety mode - the change log now runs after the equity path in its own try/catch, so a reporting price failure logs and skips the minute's entry instead of arming the equity protection. Also: server-side aggregation with a new composite index on bank_tx (type, created), rounding, and per-currency non-unit price tests. |
getBankTxFee summed chargeAmountChf only, a field the statement import stopped populating with the bank migration in December 2025 - the monthly bank cost has read zero ever since while the real fees arrive as dedicated BankAccountFee rows. Those rows now aggregate per currency (debits as cost, credits netted) and convert to CHF alongside the legacy per-tx charge sum; a missing price throws instead of hiding the position.
…tion, rounding) - the change log moved behind the equity path and runs in its own try/catch: a reporting price failure logs and skips the minute's changes entry instead of arming the equity safety mode and suppressing the financial data log - bank account fee rows aggregate server-side (GROUP BY currency and indicator) with a new composite index on bank_tx (type, created) instead of hydrating full entities every minute - the CHF total rounds like its sepa-parser sibling; conversion tests use distinct non-unit prices per currency so direction and mapping errors fail
b5b7c9c to
3bb4658
Compare
…ruction develop added BankTxFrickService to the constructor; the spec built the service positionally and fell one argument short.
❌ TypeScript: 1 errors |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
getBankTxFeesumschargeAmountChfonly — a field the statement import stopped populating with the bank migration in December 2025. The monthlyminus.bankfigure in the financial change log has read zero ever since, while the real bank costs arrive as dedicatedBankAccountFeerows (several hundred EUR per day).BankAccountFeerows since the month start aggregate per currency: debits count as cost, credits (fee refunds) net against themminus.bankalready exists and re-appears with real valuesTest plan
format:check/lint/type-checkclean