fix.
This commit is contained in:
@@ -538,7 +538,7 @@
|
|||||||
(:alternate_description je))
|
(:alternate_description je))
|
||||||
:account (:account jel)
|
:account (:account jel)
|
||||||
:location (:location jel)}))))))
|
:location (:location jel)}))))))
|
||||||
journal-entries-by-account (group-by #(account-lookup (get-in % [:account :id])))]
|
journal-entries-by-account (group-by #(account-lookup (get-in % [:account :id])) all-journal-entries)]
|
||||||
[account journal-entries] (conj journal-entries-by-account [nil all-journal-entries])
|
[account journal-entries] (conj journal-entries-by-account [nil all-journal-entries])
|
||||||
:let [journal-entries (first (reduce
|
:let [journal-entries (first (reduce
|
||||||
(fn [[acc last-je] je]
|
(fn [[acc last-je] je]
|
||||||
@@ -552,7 +552,8 @@
|
|||||||
{:category category
|
{:category category
|
||||||
:client_id client-id
|
:client_id client-id
|
||||||
:location location
|
:location location
|
||||||
:account account
|
:account (or account
|
||||||
|
{:name category})
|
||||||
:journal_entries (when account (sort-by :date journal-entries))
|
:journal_entries (when account (sort-by :date journal-entries))
|
||||||
:total (- (or (reduce + 0.0 (map #(or (:credit %) 0.0) journal-entries)) 0.0)
|
:total (- (or (reduce + 0.0 (map #(or (:credit %) 0.0) journal-entries)) 0.0)
|
||||||
(or (reduce + 0.0 (map #(or (:debit %) 0.0) journal-entries)) 0.0))})})
|
(or (reduce + 0.0 (map #(or (:debit %) 0.0) journal-entries)) 0.0))})})
|
||||||
|
|||||||
Reference in New Issue
Block a user