Use balance struct and move it to member-print-table.

This commit is contained in:
Dominik Pantůček 2023-04-02 19:02:32 +02:00
parent f9eb053c9a
commit 952fd03f16
2 changed files with 12 additions and 12 deletions

View file

@ -147,7 +147,17 @@
(member-calendar->table mr))
)
#:row0-border #t
#:col-border #t)))
#:col-border #t))
(let* ((balance (member-balance mr))
(fees (dict-ref balance 'fees))
(credit (dict-ref balance 'credit))
(payment (dict-ref balance 'payment))
(total (- (+ credit payment) fees)))
(print "Total fees: " fees)
(print "Total credit: " credit)
(print "Total payments: " payment)
(print "Balance: " total)
))
;; Nicely prints the member source with any errors recorded.
(define (print-member-source mr)