Update notifications dependencies.
This commit is contained in:
parent
09bce0be88
commit
5200b26685
3 changed files with 38 additions and 14 deletions
|
@ -201,7 +201,8 @@ members-print.import.scm: $(MEMBERS-PRINT-SOURCES)
|
|||
|
||||
MEMBERS-FEES-SOURCES=members-fees.scm configuration.import.scm \
|
||||
brmember.import.scm month.import.scm table.import.scm \
|
||||
mbase.import.scm specification.import.scm
|
||||
mbase.import.scm specification.import.scm \
|
||||
util-list.import.scm
|
||||
|
||||
members-fees.o: members-fees.import.scm
|
||||
members-fees.import.scm: $(MEMBERS-FEES-SOURCES)
|
||||
|
@ -329,7 +330,8 @@ util-mail.import.scm: $(UTIL-MAIL-SOURCES)
|
|||
NOTIFICATIONS-SOURCES=notifications.scm brmember.import.scm \
|
||||
util-mail.import.scm util-dict-list.import.scm \
|
||||
members-payments.import.scm util-format.import.scm \
|
||||
brmember-format.import.scm configuration.import.scm
|
||||
brmember-format.import.scm configuration.import.scm \
|
||||
util-time.import.scm members-fees.import.scm
|
||||
|
||||
notifications.o: notifications.import.scm
|
||||
notifications.import.scm: $(NOTIFICATIONS-SOURCES)
|
||||
|
|
|
@ -38,6 +38,7 @@
|
|||
member-fees-total
|
||||
member-credit-total
|
||||
member-calendar->table
|
||||
members-summary
|
||||
)
|
||||
|
||||
(import scheme
|
||||
|
@ -51,7 +52,8 @@
|
|||
table
|
||||
mbase
|
||||
period
|
||||
specification)
|
||||
specification
|
||||
util-list)
|
||||
|
||||
;; Returns a matching list of (list regular student)
|
||||
(define (lookup-member-fees)
|
||||
|
@ -179,4 +181,15 @@
|
|||
#:ansi #t
|
||||
)))
|
||||
|
||||
;; Summarizes (cons students full) counts
|
||||
(define (members-summary mb)
|
||||
(let ((members (filter
|
||||
brmember-active?
|
||||
(mbase-members mb))))
|
||||
(foldl (lambda (acc mr)
|
||||
(cons (+ (car acc) (if (brmember-student? mr) 1 0))
|
||||
(+ (cdr acc) (if (brmember-student? mr) 0 1))))
|
||||
(cons 0 0)
|
||||
members)))
|
||||
|
||||
)
|
||||
|
|
|
@ -44,7 +44,8 @@
|
|||
util-format
|
||||
brmember-format
|
||||
configuration
|
||||
util-time)
|
||||
util-time
|
||||
members-fees)
|
||||
|
||||
;; Prints email to the console
|
||||
(define (print-notification-email em)
|
||||
|
@ -109,9 +110,17 @@
|
|||
(let ((em (make-reminder-email mr)))
|
||||
(send-notification-email em)))
|
||||
|
||||
;; Summary email of membership fees payments
|
||||
(define (summary-email-body mb)
|
||||
'("yyy"))
|
||||
(let* ((mbs (members-summary mb))
|
||||
(students (car mbs))
|
||||
(full (cdr mbs)))
|
||||
(list (format "Expected income: ~A" 0)
|
||||
(format " ~A full members" full)
|
||||
(format " ~A students" students)
|
||||
)))
|
||||
|
||||
;; Creates the summary email structure
|
||||
(define (make-summary-email mb)
|
||||
(make-ldict
|
||||
`((to . ,(*summary-mailto*))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue