Preliminary payments and fees in one table.

This commit is contained in:
Dominik Pantůček 2023-06-18 19:45:19 +02:00
parent a6f307d230
commit 34f54b2bb0
3 changed files with 22 additions and 6 deletions

View file

@ -269,10 +269,7 @@
(print "Current month: " (cal-month->string (*current-month*)))
(newline)
(if mr
(let ()
(print-member-table mr)
(brmember-balance-history mr)
)
(print-members-base-table MB))
(newline))
((print-stats)
@ -320,7 +317,9 @@
(loop (cdr mrs))))))))
((fees)
(newline)
(print-members-fees-table MB (-show-destroyed-)))
(if mr
(print-member-balances-table mr)
(print-members-fees-table MB (-show-destroyed-))))
((repl)
(repl))
((genweb)

View file

@ -282,7 +282,7 @@
(bal 0))
(if (null? trs)
(let ((res (reverse rbls)))
(print res)
;;(print res)
res)
(let* ((amt (list-ref (car trs) 4))
(nbal (+ bal amt)))

View file

@ -39,6 +39,7 @@
print-members-fees-table
unpaired-table
print-unpaired-table
print-member-balances-table
)
(import scheme
@ -543,4 +544,20 @@
(unpaired-table mb)
"\n")))
;; Prints fees/payments/balances of one member
(define (print-member-balances-table mr)
(let ((data (map (lambda (r)
(list (cal-day->string (cadr r))
(list-ref r 4)
(format "\t~A" (exact->inexact (list-ref r 5)))
(format "\t~A" (exact->inexact (car r)))
))
(brmember-balance-history mr))))
(print-table
#:border '(((#:bottom #:right light) ... (#:bottom light))
((#:right light) ... none)
...)
(cons '("\tDate\t" "\tComment\t" "\tAmount\t" "\tBalance\t")
data))))
)