Use current month for filtering payments in member-record.

This commit is contained in:
Dominik Pantůček 2023-04-04 10:00:07 +02:00
parent ba62b905fd
commit f62fe1a08c
3 changed files with 12 additions and 14 deletions

View file

@ -83,7 +83,8 @@
period
configuration
primes
utils)
utils
bank-account)
;; Checks whether given string is a 4-digit decimal number.
(define (is-4digit-string? s)
@ -353,7 +354,11 @@
;; Returns alist of member payments
(define (member-payments mr)
(dict-ref mr 'payments '()))
(filter (lambda (tr)
(let* ((isodate (bank-transaction-date tr))
(month (iso-date->month isodate)))
(month<=? month (*current-month*))))
(dict-ref mr 'payments '())))
;; Self-tests
(define (member-record-tests!)