GNOME Bugzilla – Bug 680104
formula not calculated when variables are mixed with constants
Last modified: 2018-06-29 23:09:35 UTC
Create a new Scheduled Transaction with the following template: |Account | Debit | Credit | |----------|--------------|--------| |Checking | | 300 | |Interest | interest | | |Liability | 300-interest | | When the Scheduled Transaction is entered in the register it comes out as the following: |Account | Debit | Credit | |--------------|----------|----------| |Checking | | 300 | |Interest | interest | | |Liability | 300 | | |Imbalance-USD | | interest | Based on help from the mailing lists, it was determined the following works correctly: |Account | Debit | Credit | |----------|----------------|--------| |Checking | | total | |Interest | interest | | |Liability | total-interest | | The articles linked in the FAQ show variables and constants in a multiplication formula. I created a transaction using a similar formula and it worked fine. The only difference I see here is that the variable comes first in the working formula whereas the constant comes first in the example above.
I've experience the same issue.
*** Bug 759610 has been marked as a duplicate of this bug. ***
This problem has been fixed in our software repository. The fix will go into the next software release. Once that release is available, you may want to check for a software upgrade provided by your Linux distribution. The problem was introduced by 4ea1ea02. The author of that commit thought that gnc_exp_parser_parse_separate_vars() returned false if there were no variables in the formula. It returns true unless the formula creates a numerical error.
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=680104. Please update any external references or bookmarks.