checking for existing invoices.

This commit is contained in:
Bryce Covert
2018-07-30 17:49:05 -07:00
parent 9e00372857
commit 83ba0e4db0
3 changed files with 16 additions and 3 deletions

View File

@@ -63,7 +63,7 @@
(defn get-all []
(query base-query))
(defn find-conflicting [{:keys [id invoice-number company-id vendor-id]}]
(defn find-conflicting [{:keys [id invoice-number company-id vendor-id] :as i}]
(query
(-> base-query
(helpers/merge-where [:and [:not= :id id]