 
 (s/def ::account-id integer?)
 (s/def ::action #{:debit :credit})
-(s/def ::quantity validation/big-dec-not-less-than-zero?)
+(s/def ::quantity v/big-dec-not-less-than-zero?)
 ; Balance is the running total of quantities for the account to which
 ; the item belongs
 (s/def ::balance (partial instance? BigDecimal))

  [transaction spec]
  (-> transaction
      before-validation
      (validation/validate spec validation-rules)
      after-validation))

(defn search

  [transaction]
  (with-transacted-storage (env :db)
    (let [validated (validate transaction ::existing-transaction)]
      (if (v/has-error? validated)
        validated
        (let [existing (find-existing-transaction transaction)
              dereferenced-items (->> (:items existing)
