Compare oldest transactions first

This commit is contained in:
Jeremy Dormitzer 2018-05-21 08:17:57 -04:00
parent a3a6a0a77c
commit 4dc5ecc40c
No known key found for this signature in database
GPG Key ID: 04F17C0F5A32C320

View File

@ -56,7 +56,10 @@
(let [[period account filename] args (let [[period account filename] args
dcu-record (parse-dcu-csv filename) dcu-record (parse-dcu-csv filename)
ledger-record (parse-ledger-output period account) ledger-record (parse-ledger-output period account)
[dcu-unmatched ledger-unmatched] (compare-records dcu-record ledger-record '() '())] [dcu-unmatched ledger-unmatched] (compare-records
(reverse dcu-record)
(reverse ledger-record)
'() '())]
(if (> (+ (count dcu-unmatched) (count ledger-unmatched)) 0) (if (> (+ (count dcu-unmatched) (count ledger-unmatched)) 0)
(do (println "Unmatched bank transactions:") (do (println "Unmatched bank transactions:")
(doseq [t dcu-unmatched] (println (format-item t))) (doseq [t dcu-unmatched] (println (format-item t)))