diff --git a/src/report/standard-reports/Makefile.am b/src/report/standard-reports/Makefile.am index 1942229654..721c9801fc 100644 --- a/src/report/standard-reports/Makefile.am +++ b/src/report/standard-reports/Makefile.am @@ -20,7 +20,9 @@ AM_CPPFLAGS = \ gncscmmoddir = ${GNC_SHAREDIR}/guile-modules/gnucash/report/ gncscmmod_DATA = \ - standard-reports.scm + standard-reports.scm \ + balsheet-eg.css \ + balsheet-eg.eguile.scm gncscmreportmoddir = ${GNC_SHAREDIR}/guile-modules/gnucash/report/standard-reports gncscmreportmod_DATA = \ @@ -46,7 +48,8 @@ gncscmreportmod_DATA = \ trial-balance.scm \ general-journal.scm \ general-ledger.scm \ - transaction.scm + transaction.scm \ + balsheet-eg.scm if GNUCASH_SEPARATE_BUILDDIR #For executing test cases diff --git a/src/report/standard-reports/balsheet-eg.css b/src/report/standard-reports/balsheet-eg.css new file mode 100644 index 0000000000..784b03d213 --- /dev/null +++ b/src/report/standard-reports/balsheet-eg.css @@ -0,0 +1,59 @@ +/* Stylesheet for balsheet-eg.scm -- eguile-based Gnucash Balance Sheet report */ + +/* Note that body and table font family and size will be overridden */ +/* by separate report options. */ + + body { + margin: 2em; + } + table.outer { + border-spacing: 0em; + } + table.outer tr { + vertical-align: top; + } + table.accounts tr { + vertical-align: bottom; + } + table.accounts td { + } + td { + padding: 0em 0.5em; + } + td.empty { + } + td.indent { + width: 1em; + } + td.accname { + text-align: left; + vertical-align: top; + } + td.accnametotal { + text-align: left; + vertical-align: top; + font-weight: bold; + } + td.balance { + text-align: right; + vertical-align: bottom; + } + td.balancetotal { + text-align: right; + vertical-align: bottom; + font-weight: bold; + } + td.overruled { + border-top: solid thin black; + } + td.ruledtotal { + border-top: solid thin black; + border-bottom: double medium black; + font-weight: bold; + vertical-align: bottom; + } + /* Negative amounts (in addition to separate 'sign' and 'braces' options */ + .negative { color: red; } + /* Foreign currency amounts */ + .foreign { font-size: smaller; font-style: italic; } + diff --git a/src/report/standard-reports/balsheet-eg.eguile.scm b/src/report/standard-reports/balsheet-eg.eguile.scm index f80386a726..8ebb889ece 100644 --- a/src/report/standard-reports/balsheet-eg.eguile.scm +++ b/src/report/standard-reports/balsheet-eg.eguile.scm @@ -166,10 +166,12 @@ (let* ((accrec-as (process-acc-list asset-accounts #f)) (accrec-li (process-acc-list liability-accounts #t)) (accrec-eq (process-acc-list equity-accounts #t)) + (accrec-tr (process-acc-list trading-accounts #t)) (maxdepth 0) (rshift-as 0) (rshift-li 0) (rshift-eq 0) + (rshift-tr 0) (balancing-cc (gnc:make-commodity-collector)) (balancing-accrec (newaccrec-clean))) (accrec-set-namelink! accrec-as (_ "Assets Accounts")) @@ -187,6 +189,9 @@ (accrec-set-namelink! accrec-eq (_ "Equity Accounts")) (accrec-set-placeholder?! accrec-eq #t) (balancing-cc 'minusmerge (accrec-subtotal-cc accrec-eq) #f) + (accrec-set-namelink! accrec-tr (_ "Trading Accounts")) + (accrec-set-placeholder?! accrec-tr #t) + (balancing-cc 'minusmerge (accrec-subtotal-cc accrec-tr) #f) ;; Create a balancing entry (if (not (gnc-commodity-collector-allzero? balancing-cc)) (begin @@ -207,12 +212,16 @@ (if (and (one-depth-1 accrec-eq) (> (accrec-treedepth accrec-eq) 1)) (set! rshift-eq 1)) + (if (and (one-depth-1 accrec-tr) + (> (accrec-treedepth accrec-tr) 1)) + (set! rshift-tr 1)) (if debugging? (begin (display "
Assets: ") (display accrec-as) (display "
Liabilities: ") (display accrec-li) - (display "
Equities: ") (display accrec-eq))) + (display "
Equities: ") (display accrec-eq) + (display "
Trading: ") (display accrec-tr))) ?>
@@ -221,7 +230,8 @@ (set! maxdepth (max (accrec-treedepth accrec-as) (accrec-treedepth accrec-li) - (accrec-treedepth accrec-eq))) + (accrec-treedepth accrec-eq) + (accrec-treedepth accrec-tr))) ; Display assets section (display-accounts-table-r (list accrec-as) #f maxdepth rshift-as (one-depth-1 accrec-as)) @@ -229,14 +239,14 @@ ; Split table across columns if required (case opt-columns - ('autocols + ((autocols) ?> |