Get all information in HTML export.
This commit is contained in:
parent
20b3c31bf5
commit
fb1230e5e3
3 changed files with 45 additions and 4 deletions
|
@ -38,7 +38,11 @@
|
|||
(chicken string)
|
||||
brmember
|
||||
util-dir
|
||||
mbase)
|
||||
mbase
|
||||
members-payments
|
||||
cal-day
|
||||
util-git
|
||||
configuration)
|
||||
|
||||
;; Prints the HTML summary for given member to current-output-port
|
||||
(define (print-html-member mr)
|
||||
|
@ -60,9 +64,41 @@
|
|||
(print "<pre>")
|
||||
(print (string-translate*
|
||||
(string-intersperse (brmember-source mr) "\n")
|
||||
'(("<" . "<") (">" . ">") ("\"" . """))))
|
||||
'(("&" . "&") ("<" . "<") (">" . ">") ("\"" . """))))
|
||||
(print "</pre>")
|
||||
(print "<hr>")
|
||||
(print "<h2>Payments history</h2>")
|
||||
(print "<table>")
|
||||
(print "<thead><tr><th>Date</th><th>Type</th><th>Comment</th><th>Amount</th><th>Currency</th><th>Amount [CZK]</th><th>Balance</th></tr></thead>")
|
||||
(print "<tbody>")
|
||||
(for-each (lambda (hr)
|
||||
(print "<tr><td>"
|
||||
(cal-day->string (cadr hr))
|
||||
"</td><td>"
|
||||
(list-ref hr 6)
|
||||
"</td><td>"
|
||||
(list-ref hr 4)
|
||||
"</td><td>"
|
||||
(exact->inexact (list-ref hr 2))
|
||||
"</td><td>"
|
||||
(list-ref hr 3)
|
||||
"</td><td>"
|
||||
(list-ref hr 5)
|
||||
"</td><td>"
|
||||
(exact->inexact (car hr))
|
||||
"</td></tr>"
|
||||
))
|
||||
(brmember-balance-history mr))
|
||||
(print "</tbody>")
|
||||
(print "</table>")
|
||||
(print "<hr>")
|
||||
(print "<h2>Member File Git Log</h2>")
|
||||
(print "<pre>")
|
||||
(for-each print
|
||||
((git (*members-directory*) #:output)
|
||||
'log '-p '--
|
||||
(brmember-file-name mr)))
|
||||
(print "</pre>")
|
||||
(print "</body>")
|
||||
(print "</html>"))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue