[transaction] fix transaction other-account display

Previously the 'Transfer from/to' column would render "Split
Transaction" for single-split. This commit hides transfer.
This commit is contained in:
Christopher Lam 2019-03-25 16:11:37 +08:00
parent d27b165879
commit ad267682d7

View File

@ -1157,14 +1157,18 @@ be excluded from periodic reporting.")
(column-uses? 'account-name) (column-uses? 'account-name)
(column-uses? 'account-full-name))))) (column-uses? 'account-full-name)))))
(add-if (or (column-uses? 'other-account-name) (column-uses? 'other-account-code)) (add-if (or (column-uses? 'other-account-name)
(column-uses? 'other-account-code))
(vector (_ "Transfer from/to") (vector (_ "Transfer from/to")
(lambda (split transaction-row?) (lambda (split transaction-row?)
(define other-account (xaccSplitGetAccount (xaccSplitGetOtherSplit split))) (and (< 1 (xaccTransCountSplits
(account-namestring other-account (xaccSplitGetParent split)))
(column-uses? 'other-account-code) (account-namestring
(column-uses? 'other-account-name) (xaccSplitGetAccount
(column-uses? 'other-account-full-name))))) (xaccSplitGetOtherSplit split))
(column-uses? 'other-account-code)
(column-uses? 'other-account-name)
(column-uses? 'other-account-full-name))))))
(add-if (column-uses? 'shares) (add-if (column-uses? 'shares)
(vector (_ "Shares") (vector (_ "Shares")