Summary: | Cannot enter transaction with postdate prior to account's opening date error | ||
---|---|---|---|
Product: | [Applications] kmymoney | Reporter: | Ben <wellnessdoc> |
Component: | general | Assignee: | KMyMoney Devel Mailing List <kmymoney-devel> |
Status: | RESOLVED WORKSFORME | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Microsoft Windows | ||
OS: | Microsoft Windows | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Ben
2016-04-27 21:59:28 UTC
The "account" can be either the account in which you are entering the transaction, or the category to which you are assigning the transaction. Remember, KMM treats categories internally as accounts. If you can change the category after entering the transaction, and the transaction date is prior to the opening date of the category, that should probably count as a bug. Categories generally get opening dates of the date they were created, which does lead to this error. (In reply to Jack from comment #1) > The "account" can be either the account in which you are entering the > transaction, or the category to which you are assigning the transaction. > Remember, KMM treats categories internally as accounts. If you can change > the category after entering the transaction, and the transaction date is > prior to the opening date of the category, that should probably count as a > bug. Categories generally get opening dates of the date they were created, > which does lead to this error. Ahh, I didn't realize that. I don't know why a category would have a opening date associated with it aka be treated like an account, but changing the date of the category to an earlier date does seem to fix my problem, thnx! Copied from https://bugs.kde.org/show_bug.cgi?id=313793#c41 which has a different subject so I did not create a duplicate entry: Git commit 7a4901c668871882bba75068bf1256f2bf00dba0 by Thomas Baumgart. Committed on 16/05/2015 at 06:20. Pushed by tbaumgart into branch 'master'. Eliminate usage of opening date for categories Set the opening date for newly created categories to 1900-01-01 and fix existing ones to have that date during the consistency check. Since the opening date of an income/expense account (aka category) is not used throughout the application, it should not interfer with the check that the opening dates of all accounts referenced in a transaction are prior to the transaction's post date. Setting the opening date of a category to the above mentioned value makes sure that a category is always 'opened' before the transaction took place. The UI elements for the opening date have been removed from the account/category edit dialog as they are not used anymore. GUI: M +8 -2 kmymoney/dialogs/knewaccountdlg.cpp M +1 -0 kmymoney/dialogs/knewaccountdlg.h M +16 -16 kmymoney/dialogs/knewaccountdlgdecl.ui M +2 -0 kmymoney/kmymoney.cpp M +13 -0 kmymoney/mymoney/mymoneyfile.cpp M +71 -0 kmymoney/mymoney/mymoneyfiletest.cpp M +1 -0 kmymoney/mymoney/mymoneyfiletest.h http://commits.kde.org/kmymoney/7a4901c668871882bba75068bf1256f2bf00dba0 |