 
 (defn- accounts-source
   [text]
-  (->> @*accounts*
+  (->> @accounts
        (filter #(not= -1 (-> (:path %)
                              (.toLowerCase)
                              (.indexOf text))))

     [:th "Name"]
     [:th (util/space)]]]
   [:tbody
    (if (seq @*accounts*)
      (doall (mapcat #(account-type-rows %) (nest @*accounts*)))
      [:tr
       [:td {:colSpan 2} [:span.inline-status "Loading..."]]])]])

(defn- accounts-page []
  (accounts/get-all (:id @state/current-entity)
                    #(reset! *accounts* (-> % nest unnest))
                    notify/danger)
  (commodities/get-all (:id @state/current-entity)
                       #(reset! *commodities* %)
                       notify/danger)
  (with-layout
    [:section

                                     typeahead-input
                                     required]]))

(def ^:private accounts (r/atom []))
(def ^:private commodities (r/atom []))

(defn- delete
  [account]
