     (let [validated (validate s ::new-transaction transaction)]
       (if (validation/has-error? validated)
         validated
-
-        (create-transaction-without-balances s validated)
-
-        #_(if (delay-balances? (:entity-id transaction))
+        (if (delay-balances? (:entity-id transaction))
             (create-transaction-without-balances s validated)
             (create-transaction-and-adjust-balances s validated))))))
 

  with new balance and index values"
  [storage transaction-date [account-id items]]
  (let [sorted-items (sort-by :index items)
        previous-item (get-previous-item storage (first sorted-items) transaction-date)
        previous-balance (or (get previous-item :balance)
                             (bigdec 0))
        previous-index (or (get previous-item :index) -1)]

            s
            {:account-id (:account-id reference-item)
             :index [:>= (:index reference-item)]
             :transaction-date [:between (:transaction-date reference-item) (t/today)]} ; TODO: let the system look up the latest date
            {:sort [[:index :desc]]})
          (remove #(= (:id reference-item) (:id %)))
          (map after-item-read)))))
