-
Notifications
You must be signed in to change notification settings - Fork 805
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New txn warnings #1883
Open
christopherlam
wants to merge
5
commits into
Gnucash:stable
Choose a base branch
from
christopherlam:new-txn-warnings
base: stable
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
New txn warnings #1883
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
9e1a392
[utest-Account.cpp] test bool from xaccAccountGetReconcileLastDate
christopherlam 27318d3
[Account.cpp] cache account->last_recn_date getter
christopherlam 0bde786
[import-main-matcher.cpp] warn if trans_date < recn_date
christopherlam 1eedc78
[gnc-ofx-import.cpp] use <string>
christopherlam 5f604a4
[gnc-ofx-import.cpp] if OFX corrects a transaction, show correction
christopherlam File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you want to say `"The import includes at least one transaction whose posted date %s is before the last reconciliation date %s of account %s for which it has a split. This may make reconciliation of that account difficult."
But that's utter nonsense. GnuCash's reconciliation mechanism handles that situation very nicely. It's a pretty common occurence and raising a warning about it will only be annoying.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd offer an alternative view... it's common to have multiple accounts, eg checking, savings, spouse bank accounts tracked.
If I have reconciled my checking account with the bank statement dated 31-dec-2023 successfully, it means all bank's transactions have been matched with my book account. It would be unusual that I'd want to add another split in my checking account before 31-dec-2023. In my view, any import which automatically or manually matches to the checking account before 31-dec-2023 is a mismatch, and it would be nice to detect this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In my usage it's quite common for a payment I posted not to clear the bank for a few days, sometimes even weeks and in that case the transaction won't get reconciled until a later statement. It would be pretty annoying for GnuCash to pop a warning dialog every time that happens. It certainly doesn't make reconciling more difficult, the older transactions keep showing up in the reconcile window until they're reconciled, and you don't reconcile them until they show up on the bank statement.
Of course that doesn't work if you only enter transactions by importing them from the bank, but if you do that you're keeping the bank's books not your own and you have no way of noticing when a transaction doesn't clear. There's not really any reconciliation going on either: You're just downloading transactions from the bank and marking them reconciled. Since both the downloaded transactions and the statement come from the same database if not the same computer it would be pretty strange if they didn't agree.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This warning isn't about handling unreconciled splits in an account already reconciled. It's about popping up a soft warning that we're adding a new split in a reconciled account via import. The warning will only pop up as a yellow triangle instead of the red/yellow/green bars, which is not intrusive.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In my scenario I will exercise much care in manually entering data in my main checking account: it will receive all paychecks, it is regularly used to pay various operating expenses. It is also often reconciled with the bank statement.
I also hold other accounts, eg savings accounts. I'd rely on the bank imports.
This work implements a soft warning only, ensuring the main checking account doesn't receive new transactions before the reconciliation date.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not exactly, at least according to your screenshot. You add a new column that displays an icon if there's a warning on the transaction. (Oddly the example is warning about an expense account. Equity accounts normally don't represent an external account to reconcile with.) It's not as intrusive as the dialog box in your first pass but it's still intrusive.
Ensuring nothing. It adds a flag with a misleading tooltip attached when an import adds a transaction to the import account when the matched account has a reconciled date after the transaction's post date.
How might that happen? Either the matcher selected the wrong "other" account or the transaction exists but the matcher failed to match it or the transaction exists in the "other" account but with a different other account than the one you're importing now. Relying on the "other" account's last reconciled date to catch any of those is dicey: It depends on the reconcile periods of the various accounts being the same and on the order that the accounts are reconciled. It's more reliable to review carefully the import in the matcher window before clicking OK. In your case any added transaction with the checking account as a match is a problem regardless of reconciliation date. If you've already done savings account A's import and it turns up as a matched account in an add in savings account B's import that's a problem too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was a contrived example. There's no additional column. It reuses the existing automatch pixbuf column.
A better example with standard icon:
As above it won't prevent the user from adding the transaction, but will flag that the account is probably an incorrect auto-match or manual-match.
Exactly^ it would be nice to flag automatically these imports whereby an algorithm can warn of obvious warnings that the user may miss. See similar in assistant-stock-transaction.cpp -- it flags, but doesn't prevent adding a new transaction dated before the stock account latest split, which could affect capgains calculations.