Reg Run Balance for Subaccount view

Tim M tim at filmchicago.org
Fri Jul 10 11:53:33 EDT 2009


Hello,

I've attached a BETA svn diff patch against HEAD which creates a new cell
type, RBALN_CELL.  I could use some help tweaking this patch if someone is
able to provide answers to my questions below.

This cell calculates the balance of all transactions in a register at
runtime, allowing a running balance to be displayed when using the "Open
Subaccounts" feature.  The cell currently calculates the running balance of
all splits that are going to/from the lead account and all of its
subaccounts, therefore it is not appropriate (currently) to use this cell
type in a non-subaccount register view.

My Questions:

1. There is an outstanding issue with this patch where it appears the return
value of the gnc_split_register_get_rbaln_entry() function is printed in the
Balance column of the split rows.  The running Balance is correctly printed
on the Transaction rows, but the cells in the Balance column on the lines of
the split should be blank.  Instead, they display 1 (for all transactions
where a balance is printed) or 0 (for the blank split at the bottom because
the function returns NULL since we don't print the balance for that txn).
How can I fix this so that the balance cell of the split lines is blank?

2. The RBALN_CELL was added to the CURSOR_SINGLE_JOURNAL cursor of the
INCOME_LEDGER/GENERAL_LEDGER/SEARCH_LEDGER cases in
split-register-layout.c.  Will this affect other register views besides the
subaccount view?  I have only tested this with asset accounts (bank,
checking) so I'm not sure if it might cause problems with different account
types.


Please take a look and let me know how I can further improve it!

Thanks,
-Tim M.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: reg_run_balance_BETA1.diff
Type: text/x-patch
Size: 5986 bytes
Desc: not available
URL: <http://lists.gnucash.org/pipermail/gnucash-devel/attachments/20090710/d0246b78/attachment.bin>


More information about the gnucash-devel mailing list