                                   :created (.getTime (js/Date.))
                                         ;:date #_(.getTime input-date)
                                   :type (if input-type-toggle :expense :income)
-                                  :value input-value}]
+                                  :value (-> input-value
+                                             js/parseFloat
+                                             (* 100)
+                                             js/Math.round)}]
                       (do
                         (om/transact! component `[(transactions/add ~new-tx)])
                         (om/update-state! component assoc :input-value nil)

(defui App
  static om/IQueryParams
  (params [this]
    {:start-date (js/Date. 2016) :end-date (js/Date. 2017)})
  static om/IQuery
  (query [this]
    '[:transactions
      (:account/balance {:start-date ?start-date :end-date ?end-date})])
  Object
  (componentWillMount [this]

      [:th "Description"]
      [:th "Value"]]
     (mapv
      (fn [{:keys [id description created value type date] :as tx}]
        [:tr {:key id}
         [:td (-> created
                  js/Date.
                  .toLocaleDateString)]
         [:td description]
         [:td {:style {:color (if (= type :expense) "#F00" "#0F0")}} value]])
      transactions)]]])


(defn transaction-add-button [component]
