                                                    dereferenced-account-id-base-items))
 
               ; update the transaction record itself
-              updated (update-transaction storage validated)
-              ]
+              updated (update-transaction storage validated)]
           (reload storage validated)))
 
         #_(let [dereferenced-base-items (process-removals

  (cond-> item
    true (update-in [:value] #(or % (:amount item)))
    true (assoc :balance (bigdec 0))
    (string? (:account-id item)) (update-in [:account-id] #(Integer. %))
    (nil? (:id item)) (dissoc :id)
    (and

                                                      (map #(get-previous-item storage %)))

              ; current items
              upserted-items (mapv #(as-> % i
                                      (assoc i :transaction-id (:id validated))
                                      (before-save-item i)
                                      (upsert-item storage i))
                                   (:items validated))

              current-base-items (->> upserted-items
                                      (map (fn [current-item]
                                             (let [existing-item (some #(= (:id %) (:id current-item))(:items existing))]
                                               (if (> 0 (compare (:transaction-date current-item)
