More ignored transactions.
This commit is contained in:
parent
073c1efbc6
commit
29d4c7986f
1 changed files with 9 additions and 4 deletions
|
@ -60,13 +60,17 @@
|
|||
(make-period-lookup-table
|
||||
'(((2010 1) 25))))
|
||||
|
||||
;; Transaction types to ignore
|
||||
(define ignored-transaction-types
|
||||
'("Poplatek" "Připsaný úrok"))
|
||||
|
||||
;; Lookup CZK/EUR
|
||||
(define (lookup-eur-rate)
|
||||
(car (lookup-by-period exchange-rates-lookup-table)))
|
||||
|
||||
;; Extract probable member-id from transaction
|
||||
(define (transaction-extract-member-id transaction)
|
||||
(if (equal? (bank-transaction-type transaction) "Poplatek")
|
||||
(if (member (bank-transaction-type transaction) ignored-transaction-types)
|
||||
#f
|
||||
(let* ((varsym-id0
|
||||
(string->number
|
||||
|
@ -94,8 +98,8 @@
|
|||
mb
|
||||
(let* ((transaction (car transactions))
|
||||
(varsym-id (transaction-extract-member-id transaction))
|
||||
(member (find-member-by-id mb varsym-id)))
|
||||
(loop (if member
|
||||
(bmember (find-member-by-id mb varsym-id)))
|
||||
(loop (if bmember
|
||||
(members-base-update
|
||||
mb
|
||||
(lambda (mr)
|
||||
|
@ -108,7 +112,8 @@
|
|||
(> (bank-transaction-amount transaction) 0)
|
||||
(not (bank-accounts-member? all-accounts
|
||||
(bank-transaction-account transaction)
|
||||
(bank-transaction-bank transaction))))
|
||||
(bank-transaction-bank transaction)))
|
||||
(not (member (bank-transaction-type transaction) ignored-transaction-types)))
|
||||
(members-base-add-unpaired mb transaction)
|
||||
mb))
|
||||
(cdr transactions))))))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue