[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 (addto! row-contents
(gnc:make-html-table-cell/markup (gnc:make-html-table-cell/markup
"text-cell" "text-cell"
(if split-info? (cond
(if transaction-info? ((not split-info?) #f)
(let ((other-split ((not transaction-info?) (gnc-account-get-full-name account))
(xaccSplitGetOtherSplit split))) (else (case (xaccTransCountSplits (xaccSplitGetParent split))
(if (not (null? other-split)) ((2) (gnc-account-get-full-name
(gnc-account-get-full-name (xaccSplitGetAccount
(xaccSplitGetAccount other-split)) (xaccSplitGetOtherSplit split))))
(_ "-- Split Transaction --"))) ((1) (_ "None"))
(gnc-account-get-full-name account)) (else (_ "-- Split Transaction --"))))))))
" "))))
(if (shares-col column-vector) (if (shares-col column-vector)
(addto! row-contents (addto! row-contents
(gnc:make-html-table-cell/markup (gnc:make-html-table-cell/markup