mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Christian Stimming's report patch.
* src/scm/html-table.scm (gnc:html-table-remove-last-row!): Added function. * src/scm/html-utilities.scm (gnc:html-build-acct-table): Added removal of the last empty line above the total sum. * src/scm/html-document.scm: changed rendering of #f from one whitespace to equally arbitrary three whitespaces. FIXME: This should be configurable by a style-sheet. * src/scm/report/pnl.scm: deactivated column headers. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@3895 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
6eb9c411a8
commit
c7b23bb007
14
ChangeLog
14
ChangeLog
@ -1,3 +1,17 @@
|
||||
2001-04-05 Christian Stimming <stimming@tuhh.de>
|
||||
|
||||
* src/scm/html-table.scm (gnc:html-table-remove-last-row!): Added
|
||||
function.
|
||||
|
||||
* src/scm/html-utilities.scm (gnc:html-build-acct-table): Added
|
||||
removal of the last empty line above the total sum.
|
||||
|
||||
* src/scm/html-document.scm: changed rendering of #f from one
|
||||
whitespace to equally arbitrary three whitespaces. FIXME: This
|
||||
should be configurable by a style-sheet.
|
||||
|
||||
* src/scm/report/pnl.scm: deactivated column headers.
|
||||
|
||||
2001-04-05 Robert Graham Merkel <rgmerk@mira.net>
|
||||
|
||||
* src/scm/report/balance-sheet.scm: Relabel summary rows, fix
|
||||
|
@ -362,7 +362,7 @@
|
||||
(lambda (obj doc)
|
||||
(gnc:html-document-render-data doc obj))
|
||||
;; if the object is #f, make it a placeholder
|
||||
(if obj obj " ")))
|
||||
(if obj obj " ")))
|
||||
(cond
|
||||
((gnc:html-text? obj)
|
||||
(set! o (gnc:make-html-object-internal
|
||||
|
@ -338,6 +338,20 @@
|
||||
(gnc:html-table-set-data! table dd)
|
||||
new-num-rows))
|
||||
|
||||
(define (gnc:html-table-remove-last-row! table)
|
||||
(if (> (gnc:html-table-num-rows table) 0)
|
||||
(begin
|
||||
(gnc:html-table-set-num-rows-internal!
|
||||
table
|
||||
(- (gnc:html-table-num-rows table) 1))
|
||||
(gnc:html-table-set-data!
|
||||
table
|
||||
;; Note that the rows in html-table-data are stored in
|
||||
;; reverse, i.e. the last appended table row is the first
|
||||
;; list element.
|
||||
(cdr (gnc:html-table-data table))))
|
||||
'()))
|
||||
|
||||
(define (gnc:html-table-prepend-row! table newrow)
|
||||
(let* ((dd (gnc:html-table-data table))
|
||||
(current-num-rows (gnc:html-table-num-rows table))
|
||||
|
@ -370,7 +370,7 @@
|
||||
(define (add-group! current-depth groupname subaccounts thisbalance)
|
||||
(begin
|
||||
;; first the group name
|
||||
(add-subtotal-row! current-depth groupname #f #f)
|
||||
(add-subtotal-row! current-depth groupname #f #t)
|
||||
;; then all the subaccounts
|
||||
(traverse-accounts! subaccounts (+ 1 current-depth))
|
||||
;; and now the "total" row
|
||||
@ -429,6 +429,21 @@
|
||||
;; No extra grouping.
|
||||
(traverse-accounts! (filter show-acct? topl-accounts) 1))
|
||||
|
||||
;; This is kind of a hack: Remove the last appended row iff it has
|
||||
;; an empty text field (resulting from the add-group! function
|
||||
;; above). Depends on the structure of html-table-data, i.e. if
|
||||
;; those are changed then this might break.
|
||||
(let ((row-head (car (car (gnc:html-table-data table)))))
|
||||
(if (gnc:html-table-cell? row-head)
|
||||
(if (car (gnc:html-table-cell-data row-head))
|
||||
'()
|
||||
;; html-table-cell-data field is #f i.e. empty.
|
||||
(gnc:html-table-remove-last-row! table))
|
||||
(if row-head
|
||||
'()
|
||||
;; html-table-data element is #f in itself.
|
||||
(gnc:html-table-remove-last-row! table))))
|
||||
|
||||
;; Show the total sum.
|
||||
(if show-total?
|
||||
(begin
|
||||
|
@ -139,7 +139,7 @@
|
||||
;; do the processing here
|
||||
(table (gnc:html-build-acct-table
|
||||
from-date-tp to-date-tp
|
||||
tree-depth show-subaccts? accounts #t
|
||||
tree-depth show-subaccts? accounts #f
|
||||
#t gnc:accounts-get-comm-total-profit
|
||||
(_ "Profit") do-grouping? do-subtotals?
|
||||
show-fcur? report-currency exchange-fn)))
|
||||
|
Loading…
Reference in New Issue
Block a user