GNOME Bugzilla – Bug 684670
Interest amount calculation is wrong in Sqllite3 format
Last modified: 2018-06-29 23:10:48 UTC
Actions → Scheduled Transactions → Mortgage and Loan Repayment.... Loan Amount: 23000 Interest Rate: 3.168% Type: Fixe rate Start Date: 2009/06/22 Length: 84 Months Remaining: 47 With Xml => Interest 35.62 (right) With Sqllite3 => Interest 61.36 (wrong)
Repayment Frequency on the last screen: - Frequency: monthly - Start date for loan repayments: 2012/09/22
If the result with the xml backend is right, we have a problem with the SQL backend.
We have lots of problems with the SQL backend. So with my trusty HP12C, I see that the first month's interest on 23000 is 60.72 and that after paying for 37 months it's 35.62. 61.36 is what the interest would be if the loan had had no payments for 48 months. It would seem that the SQL backend isn't storing something, or is perhaps storing something incorrectly.
After a bit of testing, a clarification and update: Clarification: ignore the summary of payments in the last screen of the mortgage wizard. It's wrong, and it fortunately doesn't reflect what's actually created by the SX engine. The procedure to follow is to run the wizard with the parameters above, click "Apply" at the end, then save (XML only) and quit or switch to a different file, then switch back, accepting the "since last run" box. Update: For 10Sep2013, with that date as the first payment: Total Principal Interest XML $305.65 280.18 25.47 SQL $305.65 244.29 61.36 If with SQL you select Actions>Scheduled Transactions>Since Last Run without quitting, the results are the same as for XML; this suggests that there's something that isn't saved correctly in the SX. Doing a "save as" to SQL with the pending SX *also* produces the same answer as XML, meaning that the problem is with a missing "mark dirty" to make the automated save rather than a failure of the SQL backend to completely save when its given the opportunity.
OK, found and fixed it, r23164/5.
Reassign version to 2.4.x so that individual 2.4 versions can be retired.
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=684670. Please update any external references or bookmarks.