From c29409f45a66dcf4fffe5986682f4081b47c4c2a Mon Sep 17 00:00:00 2001 From: Christopher Lam Date: Sun, 19 Jan 2020 19:22:33 +0800 Subject: [PATCH] Bug 797591 - multiperiod b/s and PnL reports: add style sheet 'easy' Change headers & subtotals row markup to "primary-subheading". --- .../report/standard-reports/balsheet-pnl.scm | 42 +++++++++++-------- 1 file changed, 25 insertions(+), 17 deletions(-) diff --git a/gnucash/report/standard-reports/balsheet-pnl.scm b/gnucash/report/standard-reports/balsheet-pnl.scm index faa2c09279..bed2908248 100644 --- a/gnucash/report/standard-reports/balsheet-pnl.scm +++ b/gnucash/report/standard-reports/balsheet-pnl.scm @@ -407,24 +407,28 @@ also show overall period profit & loss.")) (define (make-narrow-cell) (gnc:make-html-table-cell/min-width 1)) - (define (add-indented-row indent label label-markup amount-indent rest) + (define (add-indented-row indent label label-markup row-markup amount-indent rest) (when (or (not depth-limit) (<= indent depth-limit)) - (gnc:html-table-append-row! - table - (append (if disable-account-indent? - '() (make-list-thunk indent make-narrow-cell)) - (list (if label-markup - (gnc:make-html-table-cell/size/markup - 1 (if disable-account-indent? 1 (- maxindent indent)) - label-markup label) - (gnc:make-html-table-cell/size - 1 (if disable-account-indent? 1 (- maxindent indent)) - label))) - (gnc:html-make-empty-cells - (if amount-indenting? (1- amount-indent) 0)) - rest - (gnc:html-make-empty-cells - (if amount-indenting? (- maxindent amount-indent) 0)))))) + (let* ((account-cell (if label-markup + (gnc:make-html-table-cell/size/markup + 1 (if disable-account-indent? 1 (- maxindent indent)) + label-markup label) + (gnc:make-html-table-cell/size + 1 (if disable-account-indent? 1 (- maxindent indent)) + label))) + (row (append + (if disable-account-indent? + '() + (make-list-thunk indent make-narrow-cell)) + (list account-cell) + (gnc:html-make-empty-cells + (if amount-indenting? (1- amount-indent) 0)) + rest + (gnc:html-make-empty-cells + (if amount-indenting? (- maxindent amount-indent) 0))))) + (if row-markup + (gnc:html-table-append-row/markup! table row-markup row) + (gnc:html-table-append-row! table row))))) (define (monetary+ . monetaries) ;; usage: (monetary+ monetary...) @@ -549,6 +553,7 @@ also show overall period profit & loss.")) (if account-style-normal? "text-cell" "total-label-cell") + #f (- maxindent lvl) (map (lambda (col-datum) @@ -574,6 +579,7 @@ also show overall period profit & loss.")) (add-indented-row lvl-curr (render-account curr #f) "text-cell" + #f (- maxindent lvl-curr account-indent) (map (lambda (col-datum) @@ -595,6 +601,7 @@ also show overall period profit & loss.")) (add-indented-row 0 title "total-label-cell" + "primary-subheading" maxindent (if get-col-header-fn (map @@ -643,6 +650,7 @@ also show overall period profit & loss.")) (add-indented-row 0 (string-append (_ "Total For ") title) "total-label-cell" + "primary-subheading" maxindent (map (lambda (col-datum)