TR: (ENH) enable subtotal/grouping for Transaction Notes

This commit is contained in:
Christopher Lam 2018-05-01 21:06:54 +08:00
parent 2102c55bb7
commit 4a7bc0b53d
2 changed files with 12 additions and 0 deletions

View File

@ -725,6 +725,12 @@
'("Expenses" "Expenses" "Income" "Income" "Liabilities")
(get-row-col sxml #f 6)))
(set-option! options "Sorting" "Primary Key" 'notes)
(let* ((sxml (options->sxml options "sorting=trans-notes")))
(test-equal "sort by transaction notes"
'("memo-3" "memo-2" "memo-1" "notes3")
(get-row-col sxml #f 4)))
(set-option! options "Sorting" "Primary Key" 'amount)
(let* ((sxml (options->sxml options "sorting=amount")))
(test-equal "sort by amount"

View File

@ -225,6 +225,12 @@ in the Options panel."))
(cons 'tip (_ "Sort by memo."))
(cons 'renderer-fn #f)))
(cons 'notes (list (cons 'sortkey #f)
(cons 'split-sortvalue (lambda (s) (xaccTransGetNotes (xaccSplitGetParent s))))
(cons 'text (_ "Notes"))
(cons 'tip (_ "Sort by transaction notes."))
(cons 'renderer-fn (lambda (s) (xaccTransGetNotes (xaccSplitGetParent s))))))
(cons 'none (list (cons 'sortkey '())
(cons 'split-sortvalue #f)
(cons 'text (_ "None"))