Skip to content

Commit

Permalink
Code cleanup as per Christopher Lam's suggestion.
Browse files Browse the repository at this point in the history
Remove any-col-with-subtotals? function. Simplify code.
  • Loading branch information
dawansv committed Apr 28, 2023
1 parent debe8bf commit 194a1d6
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions gnucash/report/trep-engine.scm
Original file line number Diff line number Diff line change
Expand Up @@ -1836,10 +1836,7 @@ be excluded from periodic reporting.")
(calc-fn (lambda (cell split transaction-row?)
(if (= (fn-arity (vector-ref cell 1)) 1)
((vector-ref cell 1) split)
((vector-ref cell 1) split transaction-row?))))
;; Do any of the displayed columns have a subtotal flag?
(any-col-with-subtotals?
(< 0 (length(filter cell-with-subtotals? cell-calculators)))))
((vector-ref cell 1) split transaction-row?)))))

(unless (column-uses? 'subtotals-only)
(gnc:html-table-append-row/markup!
Expand All @@ -1865,7 +1862,8 @@ be excluded from periodic reporting.")
;; unless no columns are set to show a subtotal, in which case links
;; are shown on all number cells.
(if (and opt-use-links? (or (cell-with-subtotals? cell)
(not any-col-with-subtotals?)))
(not (any cell-with-subtotals?
cell-calculators))))
(gnc:html-split-anchor split cell-content)
cell-content)))))
cell-calculators))))
Expand Down

0 comments on commit 194a1d6

Please sign in to comment.