[register] display $0.00 for zero-value splits

This commit is contained in:
Christopher Lam 2020-05-14 19:47:07 +08:00
parent ecf429a49a
commit 8ea9e41190
2 changed files with 9 additions and 9 deletions

View File

@ -265,7 +265,7 @@
" "))
(addto! row-contents " ")))
(if (credit-col column-vector)
(if (negative? (gnc:gnc-monetary-amount split-value))
(if (not (positive? (gnc:gnc-monetary-amount split-value)))
(addto! row-contents
(if split-info?
(gnc:make-html-table-cell/markup

View File

@ -66,8 +66,8 @@
(set-option options "__reg" "query" (gnc-query2scm query)))
(let ((sxml (options->sxml options "basic")))
(test-equal "table has 231 cells"
231
(test-equal "table has 232 cells"
232
(length (sxml->table-row-col sxml 1 #f #f)))
(test-equal "total debit = $2587"
@ -80,8 +80,8 @@
(set-option options "__reg" "journal" #t)
(let ((sxml (options->sxml options "journal")))
(test-equal "table has 337 cells"
337
(test-equal "table has 339 cells"
339
(length (sxml->table-row-col sxml 1 #f #f)))
(test-equal "total debit = #6"
@ -102,8 +102,8 @@
(set-option options "__reg" "ledger-type" #t)
(let ((sxml (options->sxml options "ledger-type")))
(test-equal "table has 341 cells"
341
(test-equal "table has 343 cells"
343
(length (sxml->table-row-col sxml 1 #f #f)))
(test-equal "total debit = #6"
@ -132,8 +132,8 @@
(set-option options "__reg" "double" #t)
(let ((sxml (options->sxml options "double")))
(test-equal "table has 345 cells"
345
(test-equal "table has 347 cells"
347
(length (sxml->table-row-col sxml 1 #f #f)))
(test-equal "total debit = #6"