Get all information in HTML export.
This commit is contained in:
parent
20b3c31bf5
commit
fb1230e5e3
3 changed files with 45 additions and 4 deletions
|
@ -471,7 +471,9 @@ util-list.o: util-list.import.scm
|
|||
util-list.import.scm: $(UTIL-LIST-SOURCES)
|
||||
|
||||
EXPORT-WEB-STATIC-SOURCES=export-web-static.scm brmember.import.scm \
|
||||
util-dir.import.scm mbase.import.scm
|
||||
util-dir.import.scm mbase.import.scm \
|
||||
members-payments.import.scm cal-day.import.scm \
|
||||
util-git.import.scm configuration.import.scm
|
||||
|
||||
export-web-static.o: export-web-static.import.scm
|
||||
export-web-static.import.scm: $(EXPORT-WEB-STATIC-SOURCES)
|
||||
|
|
|
@ -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>"))
|
||||
|
||||
|
|
|
@ -550,6 +550,8 @@
|
|||
(list (cal-day->string (cadr r))
|
||||
(list-ref r 6)
|
||||
(list-ref r 4)
|
||||
(format "\t~A" (exact->inexact (list-ref r 2)))
|
||||
(list-ref r 3)
|
||||
(format "\t~A" (exact->inexact (list-ref r 5)))
|
||||
(format "\t~A" (exact->inexact (car r)))
|
||||
))
|
||||
|
@ -558,7 +560,8 @@
|
|||
#:border '(((#:bottom #:right light) ... (#:bottom light))
|
||||
((#:right light) ... none)
|
||||
...)
|
||||
(cons '("\tDate\t" "\tType\t" "\tComment\t" "\tAmount\t" "\tBalance\t")
|
||||
(cons '("\tDate\t" "\tType\t" "\tComment\t"
|
||||
"\tAmount\t" "\tCurrency\t" "\tAmount [CZK]\t" "\tBalance\t")
|
||||
data))))
|
||||
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue