Convert to CZK.

This commit is contained in:
Dominik Pantůček 2023-06-18 19:22:51 +02:00
parent a10e724629
commit 3fbb68543b

View file

@ -244,20 +244,29 @@
;; history ;; history
(define (calendar->balance-history mc) (define (calendar->balance-history mc)
(map (lambda (mce) (map (lambda (mce)
(list (cal-ensure-day (car mce)) (let ((fee (member-calendar-entry->fee mce)))
(member-calendar-entry->fee mce) (list (cal-ensure-day (car mce))
"CZK" fee
(cadr mce))) 'CZK
(cadr mce)
fee)))
mc)) mc))
;; Converts bank transactions to transactions usable in balance ;; Converts bank transactions to transactions usable in balance
;; history ;; history
(define (transactions->balance-history bts) (define (transactions->balance-history bts)
(map (lambda (bt) (map (lambda (bt)
(list (parse-cal-day/month (bank-transaction-date bt)) (let ((curr (bank-transaction-currency bt))
(bank-transaction-amount bt) (amt (bank-transaction-amount bt))
(bank-transaction-currency bt) (day (parse-cal-day/month (bank-transaction-date bt))))
(bank-transaction-message bt))) (list day
amt
curr
(bank-transaction-message bt)
(if (eq? curr 'CZK)
amt
(parameterize ((*current-month* (cal-ensure-month day)))
(* amt (lookup-eur-rate)))))))
bts)) bts))
;; Returns a single credit/debit list of payments and fees calendar ;; Returns a single credit/debit list of payments and fees calendar