simple formula problems

Fred Bone Fred.Bone at dial.pipex.com
Sun Jul 15 14:10:36 EDT 2012


On 15 July 2012 at 9:42, Brad Hajek said:

> I have reviewed the 4 links in the FAQ in regards to using variables
> within scheduled transaction formulas, but have yet to get even a simple
> formula to evaluate correctly. I'm certain I'm just misunderstanding the
> documentation.
> 
> Here is one of the formulas I'm working with for a car loan:
> 
> checking account debit: 338.10
> expense account credit: interest
> liability account credit: 338.10-interest
> 
> The scheduled transaction box always prompts me as expected for the
> interest variable. Based on my reading of the FAQ links, I've configured
> the subtraction formula with parenthesis around it and a colon-equals in
> front of it without any success. I've also tried several different names
> for the variable in case 'interest' is already taken for internal
> purposes.
> 
> However, no matter what I've tried it comes out unbalanced like this:
> 
> checking account debit: 338.10
> expense account credit: interest
> liability account credit: 338.10
> imbalance-USD account debit: interest
> 
> Please tell me what I'm doing wrong. Thanks.

I don't think you have misunderstood: it doesn't seem to support the 
functionality you want.

To begin with, "interest" is *not* a reserved word: if it were, the 
correct amount wouldn't appear in the second split above.

It looks as though the presence of figures suppresses the calculation. If 
you replace the "338.10" with "total", you'll find it works as expected - 
though you now have to enter that figure as well.

What does work is to put "interest" in the debit side of "liability 
account" (and plain "338.10" in the credit side). Of course, if the 
calculation were more complicated this might not do, but for your simple 
use-case it does the trick.

(Though I think you have "credit" and "debit" crossed over anyway).



More information about the gnucash-user mailing list