Commit711b724aRecorded30 Mar 2026Repositorytally
Include description and reference number in transaction summaries
Message
format-transaction-summary now shows the merchant/description from the transaction details dict and appends the reference number in brackets. Exported transaction-description from (tally sync) for reuse.
Changed
src/tally/sync.sgl | 3 ++-
src/tally/tools.sgl | 19 +++++++++++++------
2 files changed, 15 insertions(+), 7 deletions(-)Diff
src/tally/sync.sglmodified
@@ -13,7 +13,8 @@
13
(export tally-pull-transactions 14
tally-map-transaction 15
tally-map-to-journal−16
tally-import)+16
tally-import+17
transaction-description) 18
(begin 19
20
;;; Pull transactions from Wise for a date range.src/tally/tools.sglmodified
@@ -62,13 +62,20 @@
62
(wise-profile-id (car profiles)) 63
(error "No Wise profiles found")))))) 64
−65
;;; Format a wise-transaction as a one-line summary string.+65
;;; Format a wise-transaction as a summary string with description and ref. 66
(define (format-transaction-summary txn)−67
(string-append−68
(wise-transaction-date txn) " "−69
(wise-transaction-type txn) " "−70
(number->string (wise-transaction-amount txn)) " "−71
(wise-transaction-currency txn)))+67
(let* ((details (wise-transaction-details txn))+68
(desc (transaction-description details))+69
(ref (wise-transaction-reference-number txn)))+70
(string-append+71
(wise-transaction-date txn) " "+72
(wise-transaction-type txn) " "+73
(number->string (wise-transaction-amount txn)) " "+74
(wise-transaction-currency txn) " "+75
desc+76
(if (and ref (not (string-empty? ref)))+77
(string-append " [" ref "]")+78
"")))) 79
80
;;; Format a wise-balance as a display string with optional reserved amount. 81
(define (format-balance-summary bal)