From 7857ff6987d99c1b4f289cb62ae3fbe4be891c8e Mon Sep 17 00:00:00 2001 From: Bryce Covert Date: Sun, 23 Oct 2022 07:43:31 -0700 Subject: [PATCH] trying fix. --- src/clj/auto_ap/graphql/ledger.clj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/clj/auto_ap/graphql/ledger.clj b/src/clj/auto_ap/graphql/ledger.clj index 9cfa4c34..6fa19f33 100644 --- a/src/clj/auto_ap/graphql/ledger.clj +++ b/src/clj/auto_ap/graphql/ledger.clj @@ -554,8 +554,8 @@ :location location :account account :journal_entries journal-entries - :total (- (reduce + 0.0 (map (fnil :debit 0.0) journal-entries)) - (reduce + 0.0 (map (fnil :credit 0.0) journal-entries))) + :total (- (or (reduce + 0.0 (map #(or (:debit %) 0.0) journal-entries)) 0.0) + (or (reduce + 0.0 (map (or (:credit %) 0.0) journal-entries)) 0.0)) })})