Scheduled Transactions Unparsable Formula
John Ralls
jralls at ceridwen.us
Sun May 1 10:29:24 EDT 2016
> On May 1, 2016, at 1:57 AM, 子風 <zpsyhapcst at gmail.com> wrote:
>
> GnuCash 2.6.12
> Window 7 32bit
>
> When I try to use Scheduled Transactions and make it more automatic.
>
> So I modified the "fin.scm" to meet what I need.
>
> But I can't do it. It always shows the error message "Couldn't parse redit-formula".
>
> The credit-formula is "computeInterestIncrementFixed(10422:i)"
>
> However, if I replaced "i" with "-i" like "computeInterestIncrementFixed(10422:-i)", it would be OK.
>
> But It is not what I need.
>
> There are source code as below. And I run it online working fine.
>
> https://repl.it/CLmn/1
>
> ;; for fixed rate once in a year
> (define ratePublic 0.0116)
>
> (define (gnc:futureValueR a t)
> (if (<= t 0)
Shouldn't that be "if (>= t 0)"?
> a
> (round (* (+ 1 ratePublic) (gnc:futureValueR a (- t 1))))
> )
> )
>
> (define (gnc:computeInterestIncrementFixed a t)
> (let ((thisVal (gnc:futureValueR a t))
> (prevVal (gnc:futureValueR a (- t 1)))
> )
> (- thisVal prevVal)
> )
> )
>
Regards,
John Ralls
More information about the gnucash-devel
mailing list