Work only with active members in notifications.
This commit is contained in:
parent
70a49c0973
commit
2e873ab8ba
1 changed files with 12 additions and 10 deletions
|
@ -217,16 +217,18 @@
|
|||
|
||||
;; Returns true if given member should be notified in given number of months
|
||||
(define (member-to-notify? mr . mmonths)
|
||||
(let ((months (if (null? mmonths)
|
||||
1
|
||||
(car mmonths)))
|
||||
(total (member-total-balance mr))
|
||||
(fee (lookup-member-fee (if (brmember-student? mr)
|
||||
'student
|
||||
'regular))))
|
||||
(and (brmember-active? mr)
|
||||
(< total 0)
|
||||
(< total (- (* months fee))))))
|
||||
(if (member-active? mr)
|
||||
(let ((months (if (null? mmonths)
|
||||
1
|
||||
(car mmonths)))
|
||||
(total (member-total-balance mr))
|
||||
(fee (lookup-member-fee (if (brmember-student? mr)
|
||||
'student
|
||||
'regular))))
|
||||
(and (brmember-active? mr)
|
||||
(< total 0)
|
||||
(< total (- (* months fee)))))
|
||||
#f))
|
||||
|
||||
;; Return members to notify because of late payments for more than
|
||||
;; given number of months
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue