 ;
 
 (defrecord Header [date status code payee note])
-(defrecord Amount [quantity commodity])
-(defrecord Entry [header account account-lineage entry-type amount note])
+(defrecord Entry [header account account-lineage entry-type amount commodity note])
 
 
 

                     (= (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)))


(defn transform-entry

          (fn [coll [key value opt?]]
            (cond
               (= key :account) (merge coll (transform-account value))
               (= 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)))
