!python def foo(d, val, x): return d.xact.amount + val !end --amount-expr 'foo'({$100}, 20) 2004/05/01 Checking balance Assets:Checking $500.00 Equity:Opening Balances 2004/05/29 Book Store Expenses:Books $20.00 Assets:Checking 2004/05/29 Restaurant Expenses:Food $50.00 Liabilities:MasterCard