Amending the Trial Balance report as generated by the script trial-balance.scm
Alex
mcmurchy1917-gnucash at yahoo.co.uk
Tue Jun 9 02:53:48 EDT 2015
Hi
I'm wanting to amend this script to display the account name plus it's
hierarchy. At the moment In each line of the *Trial Balance* report I
can flip between displaying the name of the account in plain text OR as
a hyperlink. All accounts are listed on separate lines irrespective as
to whether they are PlaceHolder accounts or otherwise. An example is below
> Expenditure
> Printing
> Paper D&G
> Photocopier Paper
> Photocopier - Ricoh
> Photocopier - Usage
In the above entries Expenditure and Printing are both "Placeholder"
accounts.
I would like another option so I could print each line in the Trial
Balance as follows
> Expenditure:Printing:Paper D&G
> Expenditure:Printing:Photocopier Paper
> Expenditure:Printing:Photocopier - Ricoh
> Expenditure:Printing:Photocopier - Usage
The PlaceHolder accounts are now printed on the same line as the account.
I've copied
/usr/share/gnucash/guile-modules/gnucash/report/standard-reports/trial-balance.scm
to my .gnucash directory amended the definition of the report and added
an entry to my config.user file and the report works as my own
personalised report separate from the original Trial Balance report.
In the script */trial-balance.scm/* I've found this code that does the
flipping
(list 'account-label-mode (if use-links?
'anchor
'name))
In the script */transaction.scm/* I've found this code that possibly
does what I want
(if show-account-full-name
(gnc-account-get-full-name account)
(xaccAccountGetName account))
That may have been the easy part as 'm having difficulty in determining
where the variable 'anchor is derived from in the script
*/transaction.scm/* and how I would get a handle on the account. I'm
sure with a bit of debugging I would find an answer to my question.
However, In the first instance I'd thought I would ask the community as
my question might start a useful discussion which could lead to areas
that I hadn't considered.
Can anyone provide some answers to my questions.
Alex
More information about the gnucash-user
mailing list