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)) (let* ((calculator (vector-ref cell 1))
(reverse-column? (vector-ref cell 2)) (reverse-column? (vector-ref cell 2))
(calculated (calculator split))) (calculated (calculator split)))
(if (and sign-reverses? reverse-column? calculated) (cond
(converted (gnc-numeric-neg calculated)) ((and sign-reverses? reverse-column? calculated) (converted (gnc-numeric-neg calculated)))
(converted calculated)))) (calculated (converted calculated))
(else #f))))
cell-calculators)) cell-calculators))
(if (used-date column-vector) (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" "number-cell"
(gnc:html-transaction-anchor (gnc:html-transaction-anchor
parent parent
(gnc:make-gnc-monetary report-currency cell)))) cell)))
(addto! row-contents (gnc:html-make-empty-cell)))) (addto! row-contents (gnc:html-make-empty-cell))))
cells) cells)