Transactions table.
This commit is contained in:
parent
a1f059df8b
commit
04fba0c776
4 changed files with 26 additions and 3 deletions
2
Makefile
2
Makefile
|
@ -209,7 +209,7 @@ MEMBERS-PRINT-SOURCES=members-print.scm dictionary.import.scm \
|
|||
member-record.import.scm month.import.scm utils.import.scm \
|
||||
table.import.scm listing.import.scm ansi.import.scm \
|
||||
period.import.scm primes.import.scm members-base.import.scm \
|
||||
configuration.import.scm
|
||||
configuration.import.scm bank-account.import.scm
|
||||
|
||||
members-print.so: members-print.o
|
||||
members-print.o: members-print.import.scm
|
||||
|
|
|
@ -38,6 +38,8 @@
|
|||
bank-transaction-varsym
|
||||
bank-transaction-amount
|
||||
bank-transaction-currency
|
||||
bank-transaction-date
|
||||
bank-transaction-id
|
||||
)
|
||||
|
||||
(import scheme
|
||||
|
@ -73,5 +75,8 @@
|
|||
(define bank-transaction-varsym car)
|
||||
(define bank-transaction-amount cadr)
|
||||
(define bank-transaction-currency caddr)
|
||||
(define bank-transaction-date cadddr)
|
||||
(define (bank-transaction-id tr)
|
||||
(list-ref tr 4))
|
||||
|
||||
)
|
||||
|
|
|
@ -145,7 +145,7 @@ CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|||
(print-member-table mr)
|
||||
(print-member-calendar-table mr)
|
||||
(print "Total fees: " (member-fees-total mr))
|
||||
(print mr)
|
||||
(print-member-payments mr)
|
||||
)
|
||||
(print-members-base-table MB))
|
||||
(newline))
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
print-member-info
|
||||
print-member-table
|
||||
print-member-source
|
||||
print-member-payments
|
||||
print-members-base-info
|
||||
print-members-base-table
|
||||
print-members-base-stats
|
||||
|
@ -53,7 +54,8 @@
|
|||
period
|
||||
primes
|
||||
members-base
|
||||
configuration)
|
||||
configuration
|
||||
bank-account)
|
||||
|
||||
;; Prints human-readable information
|
||||
(define (print-member-info mr)
|
||||
|
@ -146,6 +148,22 @@
|
|||
#:context -1
|
||||
)))
|
||||
|
||||
;; Prints nicely printed payments
|
||||
(define (print-member-payments mr)
|
||||
(print
|
||||
(table->string (cons
|
||||
(list "Var" "Amount" "Cur" "Date" "TrId")
|
||||
(map (lambda (tr)
|
||||
(list (sprintf "\t~A" (bank-transaction-varsym tr))
|
||||
(sprintf "\t~A" (bank-transaction-amount tr))
|
||||
(bank-transaction-currency tr)
|
||||
(bank-transaction-date tr)
|
||||
(bank-transaction-id tr)))
|
||||
(member-payments mr)))
|
||||
#:row0-border #t
|
||||
#:col-border #t
|
||||
)))
|
||||
|
||||
;; Converts member records to string, optional arguments are format
|
||||
;; and separator. Format defaults to "~N" and separator to ", ".
|
||||
(define (member-records->string mrs . args)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue