minor fixes

This commit is contained in:
Bryce Covert
2019-07-30 22:45:26 -07:00
parent f80df99098
commit ac35b406ae
3 changed files with 42 additions and 5 deletions

View File

@@ -43,7 +43,8 @@
:amount (reduce + 0
(->> lines
(map :debit)
(map js/parseFloat)))
(map js/parseFloat)
(map #(if (js/isNaN %) 0 %))))
:line-items (map (fn [{:keys [debit credit account-identifier location]}]
{:account-identifier account-identifier
:location location
@@ -51,6 +52,7 @@
:credit credit})
lines)}))))
;; EVENTS
(re-frame/reg-event-fx