[GNC] Balsheet-eg.scm problem
Alex
mcmurchy1917-gnucash at yahoo.co.uk
Fri Aug 24 10:35:20 EDT 2018
I took the gnucash balance sheet from
Reports -> Assets & Liabilities -> Balance Sheet
Clicked on the Edit report option icon on the tool bar.
Changed a few options including most importantly these fields on the
"Display" page <Template File> and <CSS stylesheet file> to match the
names of my bespoke files
My bespoke css and -equile.scm files now live in my .local/share/gnucash
directory and are named as indicated by the values in the fields
<Template File> and <CSS stylesheet file>
What may be the important changes to the files were -
> 131c131
> < <title><?scm:d coyname ?> <?scm:d reportname ?> <?scm:d
> (gnc-print-date opt-date-tp) ?></title>
> ---
> > <title><?scm:d coyname ?> <?scm:d reportname ?> <?scm:d
> (qof-print-date opt-date) ?></title>
> 133d132
> < <?scm (if css? (begin ?>
> 150a150
> >
> 152d151
> < <?scm )) ?>
> 156,158d154
> < <?scm (if (not css?) (begin ?>
> < <table border="0" cellpadding="16"><tr><td> <!-- hack for GTKHTML -->
> < <?scm )) ?>
> 160c156
> < <h2><?scm:d opt-report-title ?> <?scm:d (gnc-print-date opt-date-tp)
> ?></h2>
> ---
> > <h2><?scm:d opt-report-title ?> <?scm:d (qof-print-date opt-date)
> ?></h2>
> 164a161
> >
> 291c288
> < (one-num (gnc:make-gnc-numeric 10000 1))
> ---
> > (one-num 10000/1)
> 316d312
> < <p><?scm:d opt-extra-notes ?>
> 321,324d316
> <
> < <?scm (if (not css?) (begin ?>
> < </table> <!-- hack for GTKHTML -->
> < <?scm )) ?>
The most important changes were removing the hacks for GTKHTML
changing this line <h2><?scm:d opt-report-title ?> <?scm:d
(gnc-print-date opt-date-tp) ?></h2>
changing this line (one-num (gnc:make-gnc-numeric 10000 1))
Not sure if I needed to do all that, but I did and it had the desired
end result.
My bespoke report now differs from the standard balance sheet report
/usr/share/gnucash/scm/gnucash/report/balsheet-eg.eguile.scm in these
areas -
> 149a150
> >
> 154,155c155,156
> < <h3><?scm:d coyname ?></h3>
> < <h2><?scm:d reportname ?> <?scm:d (qof-print-date opt-date) ?></h2>
> ---
> > <!-- <h3><?scm:d coyname ?></h3> -->
> > <h2><?scm:d opt-report-title ?> <?scm:d (qof-print-date opt-date)
> ?></h2>
> 159a161
> >
> 310c312,316
> < <p><?scm:d opt-extra-notes ?>
> ---
> > <center>
> > <p><?scm
> > (display (date->string (current-date) "Printed at ~d/~m/~Y ~H:~M:~S"))
> > ?>
> > </center>
To get the display date working I have to add this line
(use-modules (srfi srfi-19)) ; for extra date functions
to
/usr/share/gnucash/scm/gnucash/report/balsheet-eg.scm
Alex
On 24/08/18 13:01, Geert Janssens wrote:
> I am curious though: where did you put your css and -eguile.scm file ? And how
> do you specify them in your report ? Did you just change the options' default
> values ?
More information about the gnucash-user
mailing list