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
|
@ -135,7 +135,8 @@ primes.import.scm: $(PRIMES-SOURCES)
|
|||
|
||||
MEMBER-RECORD-SOURCES=member-record.scm dictionary.import.scm \
|
||||
period.import.scm testing.import.scm month.import.scm \
|
||||
configuration.import.scm primes.import.scm utils.import.scm
|
||||
configuration.import.scm primes.import.scm utils.import.scm \
|
||||
bank-account.import.scm
|
||||
|
||||
member-record.o: member-record.import.scm
|
||||
member-record.import.scm: $(MEMBER-RECORD-SOURCES)
|
||||
|
@ -212,8 +213,7 @@ bank-fio.import.scm: $(BANK-FIO-SOURCES)
|
|||
|
||||
MEMBERS-PAYMENTS-SOURCES=members-payments.scm bank-account.import.scm \
|
||||
dictionary.import.scm member-fees.import.scm \
|
||||
period.import.scm configuration.import.scm utils.import.scm \
|
||||
month.import.scm
|
||||
period.import.scm configuration.import.scm
|
||||
|
||||
members-payments.o: members-payments.import.scm
|
||||
members-payments.import.scm: $(MEMBERS-PAYMENTS-SOURCES)
|
||||
|
|
|
@ -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!)
|
||||
|
|
|
@ -49,9 +49,7 @@
|
|||
dictionary
|
||||
member-fees
|
||||
period
|
||||
configuration
|
||||
utils
|
||||
month)
|
||||
configuration)
|
||||
|
||||
;; Exchange rates
|
||||
(define exchange-rates-lookup-table
|
||||
|
@ -162,12 +160,7 @@
|
|||
((CZK) amount)
|
||||
((EUR) (* amount (lookup-eur-rate)))
|
||||
(else 0))))
|
||||
(filter
|
||||
(lambda (tr)
|
||||
(let* ((isodate (bank-transaction-date tr))
|
||||
(month (iso-date->month isodate)))
|
||||
(month<=? month (*current-month*))))
|
||||
(member-payments mr)))))
|
||||
(member-payments mr))))
|
||||
|
||||
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue