           (fn [coll [key value opt?]]
             (cond
                (= key :account) (merge coll (transform-account value))
-               (= key :amount) (assoc coll :amount (transform-amount value opt?))
+               (= key :amount) (merge coll (transform-amount value opt?))
                (= key :note) (assoc coll :note (string/trim value))))
         entry-map (assoc (reduce collect-values {} values) :header header)]
     (map->Entry entry-map)))

  "Virtual unbalanced transactions must have an amount (since they are unbalanced)"
  [entries]
  (let [vu-entries (filter #(and (= (:entry-type %) :virtual-unbalanced)
                                 (or (nil? (:amount %))
                                     (nil? (:quantity (:amount %)))))
                           entries)]
    (if (> (count vu-entries) 0)
      (println "This transaction has" (count vu-entries) "virtual unbalanced entries."))))


;

                     (= (first first-val) :commodity) (string/trim (first (drop 1 first-val)))
                     (not (nil? second-val)) (string/trim (first (drop 1 second-val)))
                     :else nil)]
    {:amount quantity :commodity commodity}))


(defn transform-entry
