 (def ^:private input
   (io/input-stream "resources/fixtures/budget_sample.gnucash"))
 
+(def ids
+  {:checking    "ed92489659ab879fb9354a3a050fb65d"
+   :salary      "1b71fd298aeca1a18d35b04a7618e76e"
+   :groceries   "835bfe9b2728976d06e63b90aea8c090"
+   :credit-card "337685830c05f47b2b09734a05a7c1a2"
+   :401k        "fc053b4fc6b94898a5d6fa53ed203bd0"
+   :apple-401k  "77bfb9a7eb53ebfd5dd13b22476f58dd"
+   :ira         "294fd407b010e07e8fb54a4cab3fbd8c"
+   :apple-ira   "d65092fee5cfdacab77e7b37942675bb"
+   :other-inc   "8c62d43a4feee76da698912d7ff3a6ca"})
+
 (def ^:private declarations
   [{:record-type :commodity
     :record-count 2}

  [{:transaction-date (t/local-date 2015 1 1)
    :description "Paycheck"
    :items [{:action :debit
             :account-id "ed92489659ab879fb9354a3a050fb65d"
             :amount 1000M
             :reconciled false}
            {:action :credit
             :account-id "1b71fd298aeca1a18d35b04a7618e76e"
             :amount 1000M
             :reconciled false}]}
   {:transaction-date (t/local-date 2015 1 4)
    :description "Kroger"
    :items [{:action :debit
             :account-id "835bfe9b2728976d06e63b90aea8c090"
             :amount 100M
             :reconciled false}
            {:action :credit
             :account-id "ed92489659ab879fb9354a3a050fb65d"
             :amount 100M
             :reconciled false}]}
   {:transaction-date (t/local-date 2015 1 11)
    :description "Kroger"
    :items [{:action :debit
             :account-id "835bfe9b2728976d06e63b90aea8c090"
             :amount 100M
             :reconciled false}
            {:action :credit
             :account-id "ed92489659ab879fb9354a3a050fb65d"
             :amount 100M
             :reconciled false}]}
   {:transaction-date (t/local-date 2015 1 12)
    :description "Kroger"
    :items [{:action :debit
             :account-id "ed92489659ab879fb9354a3a050fb65d"
             :amount 10M
             :reconciled false}
            {:action :credit
             :account-id "835bfe9b2728976d06e63b90aea8c090"
             :amount 10M
             :reconciled false}]}
   {:transaction-date (t/local-date 2015 1 15)
    :description "Paycheck"
    :items [{:action :debit
             :account-id "ed92489659ab879fb9354a3a050fb65d"
             :amount 1000M
             :reconciled false}
            {:action :credit
             :account-id "1b71fd298aeca1a18d35b04a7618e76e"
             :amount 1000M
             :reconciled false}]}
   {:transaction-date (t/local-date 2015 1 18)
    :description "Kroger"
    :items [{:action :debit
             :account-id "835bfe9b2728976d06e63b90aea8c090"
             :amount 100M
             :reconciled false}
            {:action :credit
             :account-id "337685830c05f47b2b09734a05a7c1a2"
             :amount 100M
             :reconciled false}]}])



(def ^:private accounts-with-commodities
  (-> accounts
      (concat [{:id (:401k ids)
                :parent-id "d005a139a1aaab6899867923509b96ca"
                :name "401k"
                :type :asset
                :commodity {:exchange :iso4217
                            :symbol "USD"}}
               {:id (:apple-401k ids)
                :parent-id (:401k ids)
                :name "Apple, Inc"
                :type :asset
                :commodity {:exchange :nasdaq
