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
|
;; 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
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue