[register] fix Transfer acc for single-account splits

single account splits shouldn't show "-- Split Transaction --" in
transfer account. show "None".
This commit is contained in:
Christopher Lam 2019-08-24 22:53:31 +08:00
parent d7813206ce
commit 6b0bfa075c

View File

@ -228,16 +228,15 @@
(addto! row-contents
(gnc:make-html-table-cell/markup
"text-cell"
(if split-info?
(if transaction-info?
(let ((other-split
(xaccSplitGetOtherSplit split)))
(if (not (null? other-split))
(gnc-account-get-full-name
(xaccSplitGetAccount other-split))
(_ "-- Split Transaction --")))
(gnc-account-get-full-name account))
" "))))
(cond
((not split-info?) #f)
((not transaction-info?) (gnc-account-get-full-name account))
(else (case (xaccTransCountSplits (xaccSplitGetParent split))
((2) (gnc-account-get-full-name
(xaccSplitGetAccount
(xaccSplitGetOtherSplit split))))
((1) (_ "None"))
(else (_ "-- Split Transaction --"))))))))
(if (shares-col column-vector)
(addto! row-contents
(gnc:make-html-table-cell/markup