[GNC] Split transaction problem

NoobAlice NoobAlice at airmail.cc
Fri Dec 19 13:57:37 EST 2025


On 2025-12-08 11:05 AM, Ed Greenberg wrote:
*snip*
> 
> What I'd really like is a transaction template, but the closest we get are
> scheduled transactions.
> 
> Ed


I don't think this was already mentioned.  You can set up scheduled 
transactions as a template using *variables*, which gets us closer to 
what I would think of as a true template.

For example, I have one for my net payroll deposit that grosses up 
wages, deductions, and taxes.

So I have something like the following formulae with variables in the 
Debit (DR) and Credit (CR) columns:

Wages Taxable		CR rate*hours*0.9-fsa
Wages Nontax		CR rate*hours*0.1+fsa
401k asset	DR rate*hours*0.1
Fed tax		DR fedtax
State tax	DR statetax
Soc Sec Tax	DR (rate*hours-fsa)*0.062
Medicare Tax	DR (rate*hours-fsa)*0.0145
Health ins	DR fsa
Checking	DR 
rate*hours*(1-0.1-0.0145-0.062)+fsa*(0.0145+0.062)-fedtax-statetax-fsa

And the formulae can be more complicated.  Just make sure that you 
remember your order of operations.  If you want the sum of A+B to be 
multiplied by C, put A+B in parentheses:
(A+B)*C

This records that most of my wages are taxable, a percentage goes to a 
retirement account and is not taxed now, and some goes to a health FSA 
account, which also affects my taxes.

And this is scheduled to be entered each pay date.  The scheduled 
transaction pops up and requests the following variables:
rate
hours
fedtax
statetax
fsa

At the end of the year, I can tie out my taxable wages to my W-2 (wages 
totals tax form for you non-Americans :)  )

Sometimes I need to edit some lines a penny for rounding, but this works 
very well.  The scheduled transaction will also warn you when saving if 
rounding might be an issue that can cause imbalance, but that is fine. 
In Edit > Preferences > Scheduled Transactions, check the "Review 
Created Transactions" option to remind you to review the splits and fix 
those pennies.

I set this up in a spreadsheet program first to make sure I had my 
variables and math right, then set up in GnuCash, but since then it has 
been very smooth to use.  In the spreadsheet program, look at the 
cell-naming and/or range-naming option, and you can use the same 
variables in your spreadsheet that you will later use in GnuCash.

And if you already knew all this, maybe it will help someone else. :)


More information about the gnucash-user mailing list