Use current month for filtering payments in member-record.
This commit is contained in:
parent
ba62b905fd
commit
f62fe1a08c
3 changed files with 12 additions and 14 deletions
|
@ -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!)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue