Basic member fees table.

This commit is contained in:
Dominik Pantůček 2023-03-29 14:32:31 +02:00
parent 19a370e448
commit 9cfd4e21e1
2 changed files with 21 additions and 0 deletions

View file

@ -27,6 +27,7 @@ CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
(import testing
(chicken format)
(chicken sort)
listing
dictionary
month
@ -89,6 +90,7 @@ CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
(-action- 'gencards)
(-fname- (list file:cards file:desfires)))
(-problems () "Prints all files with problems" (-action- 'problems))
(-fees () "Prints fees table" (-action- 'fees))
)
;; Run tests
@ -182,4 +184,16 @@ CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
(print-member-table (car mb))
(print-member-source (car mb)))
(loop (cdr mb)))))
((fees)
(print
(table->string
(cons
(list "Member" "Fees")
(map
(lambda (mr)
(list (member-nick mr)
(sprintf "\t~A" (member-fees-total mr))))
(sort (filter-members-by-predicate MB member-active?) member<?)))
#:col0-border #t #:row0-border #t)))
)