GNOME Bugzilla – Bug 725366
Formula Parsing Error with Scheduled Mortgage Transactions
Last modified: 2018-06-29 23:27:38 UTC
Standard formulas for principal and interest from the Mortgage and Loan Setup Tool fail to parse in the Edit Scheduled Transaction interface in 2.6.1. Error says: "Couldn't parse debit formula for split "xyz"." Formulas in the debit column are the typical ones generated by the Mortgage tool: ppmt( 0.05000 / 12.00 : i : 180.00 : 100000.00 : 0 : 0 ) and ipmt( 0.05000 / 12.00 : i : 180.00 : 100000.00 : 0 : 0 ). The scheduled transaction will run, but you can not adjust any of the parameters of it, because it will never parse, and therefore never save your changes. If you edit the scheduled transaction formulas and replace the "i" with an actual number, the parse succeeds and the changes can be saved (after confirming the "cannot automatically balance this transaction" warning). Seems to work fine in 2.4.11.
I am seeing the same thing with 2.6.3 on Fedora 20.
I see the same problem with 2.6.3 in Debian testing.
And yes, it worked with Gnucash 2.4.x
Same problem with 2.6.3 on OSX Mavericks
same problem on 2.6.3 compiled from source on gentoo
OK, enough testimonials. I can reproduce the problem and I'm working on it.
This problem has been fixed in our software repository. The fix will go into the next software release. Thank you for your bug report. The problem was a poor testing approach that was exposed by some speedup and checking added to gnc-numeric, where we were using a random number generator over the full int32 range to plug into variables to test if the result balanced. That unsurprisingly led to enormous overflows and the "can't parse" message. I clamped the value of the parameter that's causing the problem, but that only bandages the loan calculations. A proper fix depends on substantial rewrites that will have to be done in master. In the course of it I discovered that the code which runs the scheme was limiting the results to 6 significant figures, which was causing rounding errors and spurious "can't balance" errors. That's fixed, too.
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=725366. Please update any external references or bookmarks.