Prepare data.

This commit is contained in:
Dominik Pantůček 2023-06-18 19:34:04 +02:00
parent b018da2c61
commit a6f307d230

View file

@ -246,10 +246,10 @@
(map (lambda (mce)
(let ((fee (member-calendar-entry->fee mce)))
(list (cal-ensure-day (car mce))
fee
(- fee)
'CZK
(cadr mce)
fee)))
(- fee))))
mc))
;; Converts bank transactions to transactions usable in balance
@ -277,7 +277,18 @@
(all (sort all-unsorted
(lambda (a b)
(cal-day<? (car a) (car b))))))
(print all)
'()))
(let loop ((trs all)
(rbls '())
(bal 0))
(if (null? trs)
(let ((res (reverse rbls)))
(print res)
res)
(let* ((amt (list-ref (car trs) 4))
(nbal (+ bal amt)))
(loop (cdr trs)
(cons (cons nbal (car trs))
rbls)
nbal))))))
)