last attempt.

This commit is contained in:
Bryce Covert
2022-10-22 21:18:27 -07:00
parent 19fcff7dc5
commit 3777b19ef1

View File

@@ -547,9 +547,9 @@
:journal_entries (reduce
(fn [[acc last-je] je]
(let [next-je (assoc je :running_balance
(- (+ (:running_balance last-je 0.0)
(:debit je 0.0))
(:credit je 0.0)))]
(- (+ (or (:running_balance last-je 0.0) 0.0)
(or (:debit je 0.0) 0.0))
(or (:credit je 0.0) 0.0)))]
[(conj acc next-je) next-je]))
[]
journal-entries)})})