invoices shouldn't be allowed to duplicate.

This commit is contained in:
Bryce Covert
2020-08-13 08:06:53 -07:00
parent 530b34500d
commit 54d5de6d33

View File

@@ -182,8 +182,8 @@
:where '[[?e :invoice/invoice-number ?invoice-number]
[?e :invoice/vendor ?vendor]
[?e :invoice/client ?client]
[(not= ?e ?invoice-id)]
]}
(not [?e :invoice/status :invoice-status/voided])
[(not= ?e ?invoice-id)]]}
:args [(d/db (d/connect uri)) invoice-number vendor client (or id 0)]}))
(map first)