test
This commit is contained in:
@@ -544,15 +544,16 @@
|
|||||||
:client_id client-id
|
:client_id client-id
|
||||||
:location location
|
:location location
|
||||||
:account account
|
:account account
|
||||||
:journal_entries (reduce
|
:journal_entries
|
||||||
(fn [[acc last-je] je]
|
(first (reduce
|
||||||
(let [next-je (assoc je :running_balance
|
(fn [[acc last-je] je]
|
||||||
(- (+ (or (:running_balance last-je 0.0) 0.0)
|
(let [next-je (assoc je :running_balance
|
||||||
(or (:debit je 0.0) 0.0))
|
(- (+ (or (:running_balance last-je 0.0) 0.0)
|
||||||
(or (:credit je 0.0) 0.0)))]
|
(or (:debit je 0.0) 0.0))
|
||||||
[(conj acc next-je) next-je]))
|
(or (:credit je 0.0) 0.0)))]
|
||||||
[]
|
[(conj acc next-je) next-je]))
|
||||||
journal-entries)})})
|
[]
|
||||||
|
journal-entries))})})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user