After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 725366 - Formula Parsing Error with Scheduled Mortgage Transactions
Formula Parsing Error with Scheduled Mortgage Transactions
Status: RESOLVED FIXED
Product: GnuCash
Classification: Other
Component: Scheduled Transactions
2.6.1
Other Windows
: Normal normal
: ---
Assigned To: gnucash-core-maint
gnucash-core-maint
Depends on:
Blocks:
 
 
Reported: 2014-02-28 04:31 UTC by Elwood
Modified: 2018-06-29 23:27 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Elwood 2014-02-28 04:31:47 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.
Comment 1 David Kaylor 2014-05-02 02:50:32 UTC
I am seeing the same thing with 2.6.3 on Fedora 20.
Comment 2 jlquinn 2014-05-18 16:44:13 UTC
I see the same problem with 2.6.3 in Debian testing.
Comment 3 jlquinn 2014-05-18 16:44:50 UTC
And yes, it worked with Gnucash 2.4.x
Comment 4 joelryan2k2 2014-06-04 11:00:33 UTC
Same problem with 2.6.3 on OSX Mavericks
Comment 5 john 2014-06-06 21:30:41 UTC
same problem on 2.6.3 compiled from source on gentoo
Comment 6 John Ralls 2014-06-06 21:36:15 UTC
OK, enough testimonials. I can reproduce the problem and I'm working on it.
Comment 7 John Ralls 2014-06-08 20:55:25 UTC
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.
Comment 8 John Ralls 2018-06-29 23:27:38 UTC
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.