Convert to CZK.
This commit is contained in:
parent
a10e724629
commit
3fbb68543b
1 changed files with 17 additions and 8 deletions
|
@ -244,20 +244,29 @@
|
|||
;; history
|
||||
(define (calendar->balance-history mc)
|
||||
(map (lambda (mce)
|
||||
(list (cal-ensure-day (car mce))
|
||||
(member-calendar-entry->fee mce)
|
||||
"CZK"
|
||||
(cadr mce)))
|
||||
(let ((fee (member-calendar-entry->fee mce)))
|
||||
(list (cal-ensure-day (car mce))
|
||||
fee
|
||||
'CZK
|
||||
(cadr mce)
|
||||
fee)))
|
||||
mc))
|
||||
|
||||
;; Converts bank transactions to transactions usable in balance
|
||||
;; history
|
||||
(define (transactions->balance-history bts)
|
||||
(map (lambda (bt)
|
||||
(list (parse-cal-day/month (bank-transaction-date bt))
|
||||
(bank-transaction-amount bt)
|
||||
(bank-transaction-currency bt)
|
||||
(bank-transaction-message bt)))
|
||||
(let ((curr (bank-transaction-currency bt))
|
||||
(amt (bank-transaction-amount bt))
|
||||
(day (parse-cal-day/month (bank-transaction-date 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))
|
||||
|
||||
;; Returns a single credit/debit list of payments and fees calendar
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue