Most parts of staging ought to work

This commit is contained in:
Bryce Covert
2020-12-26 14:10:51 -08:00
parent a46b58fe00
commit 3b39a6fa0a
7 changed files with 340 additions and 158 deletions

View File

@@ -119,7 +119,7 @@
(defn transaction-account->entity [{:keys [id account_id amount location]}]
(remove-nils #:transaction-account {:amount (Double/parseDouble amount)
(remove-nils #:transaction-account {:amount amount
:db/id id
:account account_id
:location location}))
@@ -163,7 +163,7 @@
_ (assert-can-see-client (:id context) (:transaction/client existing-transaction) )
_ (assert-valid-expense-accounts accounts)
deleted (deleted-accounts existing-transaction accounts)
account-total (reduce + 0 (map (fn [x] (Double/parseDouble (:amount x))) accounts))
account-total (reduce + 0 (map (fn [x] (:amount x)) accounts))
missing-locations (seq (set/difference
(->> accounts
(map :location)