   (doseq [item (:items transaction)]
     (as-> item i
       (assoc i :transaction-id (:id transaction))
-      (before-save-item i)
       (upsert-item storage i))))
 
 (defn- find-base-item

      (if (validation/has-error? validated)
        validated
        (do
        (let [existing (find-existing-transaction storage transaction)
              dereferenced-items (->> (:items existing)
                                     (remove #(some (fn [i] (= (:id i)
                                                               (:id %)))
                                                    (:items validated))))
              recalc-base-date (earlier (:transaction-date existing)
                                        (:transaction-date validated))
              recalc-account-ids (->> (:items validated)
                                   (concat dereferenced-items)
                                   (map :account-id)
                                   (into #{}))]
              (update-full-transaction storage validated)
              (doseq [account-id recalc-account-ids]
                (recalculate-account storage account-id recalc-base-date))))))))

(defn- get-preceding-items
  "Returns the items that precede each item in the

                                    :transaction-date transaction-date}
                                   {:limit 1})))

(defn- upsert-item
  "Updates the specified transaction item"
  [storage {:keys [id transaction-date] :as item}]
  (let [to-save (before-save-item item)]
    (if (:id to-save)
      (do
        (update-transaction-item storage to-save)
        (find-item-by-id storage id transaction-date))
      (create-transaction-item storage to-save))))

(defn- update-item-index-and-balance
  "Updates only the index and balance attributes of an item, returning true if
