Nicely formatted email body.
This commit is contained in:
parent
ac967be970
commit
f2389c963d
3 changed files with 29 additions and 17 deletions
|
@ -37,7 +37,7 @@ HACKERBASE-DEPS=hackerbase.scm month.import.scm \
|
|||
cards.import.scm members-print.import.scm \
|
||||
members-payments.import.scm web-static.import.scm \
|
||||
environment.import.scm mailman.import.scm texts.import.scm \
|
||||
tests.import.scm
|
||||
tests.import.scm reminders.import.scm
|
||||
|
||||
HACKERBASE-OBJS=hackerbase.o testing.o listing.o month.o period.o \
|
||||
ansi.o util-dict-list.o command-line.o members-base.o \
|
||||
|
@ -317,7 +317,7 @@ util-mail.import.scm: $(UTIL-MAIL-SOURCES)
|
|||
|
||||
REMINDERS-SOURCES=reminders.scm member-record.import.scm \
|
||||
util-mail.import.scm util-dict-list.import.scm \
|
||||
members-payments.import.scm util-format.scm
|
||||
members-payments.import.scm util-format.import.scm
|
||||
|
||||
reminders.o: reminders.import.scm
|
||||
reminders.import.scm: $(REMINDERS-SOURCES)
|
||||
|
|
|
@ -42,20 +42,31 @@
|
|||
|
||||
;; Creates reminder email body
|
||||
(define (reminder-email-body mr)
|
||||
(list
|
||||
(member-format "Ahoj ~N," mr)
|
||||
"podle evidence členů a bankovního účtu to vypadá, že máš nedoplatek"
|
||||
(format "ve výši ~A Kč." (format-amount (member-total-balance mr)))
|
||||
"Zkontroluj, prosím, zda tvé platby členských příspěvků"
|
||||
(member-format "s variabilním symbolem ~I byly zaslány na" mr)
|
||||
"správný účet 1234/2010"
|
||||
""
|
||||
""
|
||||
(member-format "Hi ~N," mr)
|
||||
""
|
||||
"--"
|
||||
"Brmlab Hackerspace Members Database"
|
||||
))
|
||||
(let ((C identity)
|
||||
(M (lambda (s)
|
||||
(member-format s mr)))
|
||||
(F format)
|
||||
(absdebt (format-amount (- (member-total-balance mr))))
|
||||
(macc "2500079551/2010"))
|
||||
(list
|
||||
(M "Ahoj ~N,")
|
||||
(C "podle evidence členů a bankovního účtu to vypadá, že máš nedoplatek")
|
||||
(F "ve výši ~A Kč." absdebt)
|
||||
(C "Zkontroluj, prosím, zda tvé platby členských příspěvků")
|
||||
(M "s variabilním symbolem ~I byly zaslány na")
|
||||
(F "správný účet ~A." macc)
|
||||
""
|
||||
""
|
||||
(M "Dear ~N,")
|
||||
(C "according to the members database and bank account statements, it appears")
|
||||
(F "your payment of ~A CZK is missing." absdebt)
|
||||
(C "Please, check whether your membership fees were transfered")
|
||||
(M "correctly with the variable symbol (identification) ~I to")
|
||||
(F "the correct bank account ~A." macc)
|
||||
""
|
||||
"--"
|
||||
"Brmlab Hackerspace Members Database"
|
||||
)))
|
||||
|
||||
;; Creates reminder email dictionary
|
||||
(define (make-reminder-email mr)
|
||||
|
|
|
@ -41,7 +41,8 @@
|
|||
(let* ((str (number->string amt))
|
||||
(flds (string-split str "."))
|
||||
(integer? (null? (cdr flds))))
|
||||
(if integer?
|
||||
(if (or integer?
|
||||
(string=? (cadr flds) "0"))
|
||||
(format "~A.--" (car flds))
|
||||
(format "~A.~A"
|
||||
(car flds)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue