Finish the migration.
This commit is contained in:
parent
ced789ca06
commit
0d649c2fd0
4 changed files with 70 additions and 70 deletions
|
@ -48,7 +48,7 @@
|
|||
member-record
|
||||
members-base
|
||||
bank-fio
|
||||
dictionary
|
||||
util-dict-list
|
||||
member-fees
|
||||
period
|
||||
configuration
|
||||
|
@ -178,16 +178,16 @@
|
|||
|
||||
;; Adds all balances - payments are converted to CZK in member-payments-total
|
||||
(define (member-sort-payments mr)
|
||||
(dict-set mr
|
||||
(ldict-set mr
|
||||
'payments
|
||||
(sort (dict-ref mr 'payments '())
|
||||
(sort (ldict-ref mr 'payments '())
|
||||
(lambda (a b)
|
||||
(string<? (bank-transaction-date a)
|
||||
(bank-transaction-date b))))))
|
||||
|
||||
;; Balances totals
|
||||
(define (member-balance mr)
|
||||
(make-dict `((fees . ,(member-fees-total mr))
|
||||
(make-ldict `((fees . ,(member-fees-total mr))
|
||||
(credit . ,(member-credit-total mr))
|
||||
(payment . ,(member-payments-total mr)))))
|
||||
|
||||
|
@ -195,9 +195,9 @@
|
|||
;; information
|
||||
(define (member-total-balance mr)
|
||||
(let* ((bal (member-balance mr))
|
||||
(fees (dict-ref bal 'fees 0))
|
||||
(credit (dict-ref bal 'credit 0))
|
||||
(payment (dict-ref bal 'payment)))
|
||||
(fees (ldict-ref bal 'fees 0))
|
||||
(credit (ldict-ref bal 'credit 0))
|
||||
(payment (ldict-ref bal 'payment)))
|
||||
(- (+ credit payment) fees)))
|
||||
|
||||
;; Total amount paid - calculated from payments
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue