[GNC] Formulas in Scheduled Transactions
Derek Atkins
derek at ihtfp.com
Tue Nov 16 15:14:23 EST 2021
GnuCash SX does not have a "Get Account Balance As Of Date" function, so
there is no way to get "OldAmount" here.
-derek
On Tue, November 16, 2021 3:02 pm, Fross, Michael wrote:
> Hello all,
>
> I have a fixed annuity account which updates with a new total, but does
> not
> show the interest that contributes to that total. Here is the simple
> formula to calculate the interest:
>
> Interest = NewAmount - OldAmount
>
> I thought it would be interesting to have a monthly scheduled
> transaction that would request the new value from me (which I get from my
> brokerage). The function would then subtract the current value of the
> account (OldAmount) from the value I entered (NewAmount) and then add the
> interest as a transaction in the account.
>
> While it's not a big deal to figure it out and just put in the interest, I
> thought it would be fun to see if I can get GnuCash to do it, although I
> admit I may be asking a bit too much of the scheduled transaction
> capability. Getting the NewAmount is probably as easy as adding a
> variable
> to the scheduled transaction. Adding the interest as a variable is
> probably something that can be done. I'm not sure how I could get the
> current amount in the scheme file to do the subtraction.
>
> Any thoughts on this? Is it possible? Pointers on where to begin? (I'm
> been looking through the fin.scm file, but I didn't see much documentation
> on this capability)
>
> Thanks in advance!
>
> Michael
> _______________________________________________
> gnucash-user mailing list
> gnucash-user at gnucash.org
> To update your subscription preferences or to unsubscribe:
> https://lists.gnucash.org/mailman/listinfo/gnucash-user
> If you are using Nabble or Gmane, please see
> https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
> -----
> Please remember to CC this list on all your replies.
> You can do this by using Reply-To-List or Reply-All.
>
--
Derek Atkins 617-623-3745
derek at ihtfp.com www.ihtfp.com
Computer and Internet Security Consultant
More information about the gnucash-user
mailing list