            account-id
            other-account-id]
     :as quick-entry-trx}]
-  (let [account (->> @*accounts*
-                     (filter #(= (:id %) account-id))
-                     first)
-        rename-map (if (or (and (> quantity 0M)
+  (let [rename-map (if (or (and (> quantity 0M)
                                 (left-side? account))
                            (and (< quantity 0M)
                                 (not (left-side? account))))

  (accounts/get-all (:id @state/current-entity)
                    #(reset! *accounts* (-> % nest unnest))
                    notify/danger)
  (let [account (r/atom {})
        transaction-items (r/atom nil)]
    (accounts/get-one id
                      (fn [a]
                        (reset! account a)
                        (get-items a transaction-items))
                      notify/danger)

    (with-layout
      [:section
       [:div.row
        [:div.col-md-12
         [account-header account]]]
       [:div.row
        [:div.col-md-6
         [transaction-form]]
        [:div.col-md-6
         [:div.panel.panel-default
          [:div.panel-heading
           [:h2.panel-title "Transaction Items"]]
          [:div.panel-body {:style {:height "40em" :overflow "auto"}}
           [items-table transaction-items]]]]]])))

(secretary/defroute new-account-path "/accounts/new" []
  (r/render [new-account] (app-element)))


(defn- handle-saved-transaction
  [transaction]
  (reset! working-transaction nil)
  (reset! transaction-items nil)
  (get-items))

(defn- save-transaction []
  (-> @working-transaction
