Fix some (gnc:make-gnc-monetary) errors

These errors didn't appear in the tracefile. They only appeared on Linux terminal.
This commit is contained in:
christopherlam 2017-09-21 19:51:03 +08:00 committed by Geert Janssens
parent 678794c800
commit 5b99835cb1

View File

@ -524,9 +524,10 @@ accounts must be of type ASSET for taxes paid on expenses, and type LIABILITY fo
(let* ((calculator (vector-ref cell 1))
(reverse-column? (vector-ref cell 2))
(calculated (calculator split)))
(if (and sign-reverses? reverse-column? calculated)
(converted (gnc-numeric-neg calculated))
(converted calculated))))
(cond
((and sign-reverses? reverse-column? calculated) (converted (gnc-numeric-neg calculated)))
(calculated (converted calculated))
(else #f))))
cell-calculators))
(if (used-date column-vector)
@ -622,7 +623,7 @@ accounts must be of type ASSET for taxes paid on expenses, and type LIABILITY fo
"number-cell"
(gnc:html-transaction-anchor
parent
(gnc:make-gnc-monetary report-currency cell))))
cell)))
(addto! row-contents (gnc:html-make-empty-cell))))
cells)
@ -1800,4 +1801,4 @@ for taxes paid on expenses, and type LIABILITY for taxes collected on sales.")
'name reportname
'report-guid "5bf27f249a0d11e7abc4cec278b6b50a"
'options-generator trep-options-generator
'renderer trep-renderer)
'renderer trep-renderer)