From 27603fff6e1e18447e201d855609f453dc5683c5 Mon Sep 17 00:00:00 2001 From: Bryce Covert Date: Thu, 22 Dec 2022 11:26:05 -0800 Subject: [PATCH] prevents checks from being printed for voided invoices --- src/clj/auto_ap/graphql/checks.clj | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/clj/auto_ap/graphql/checks.clj b/src/clj/auto_ap/graphql/checks.clj index 969a2f24..5213632e 100644 --- a/src/clj/auto_ap/graphql/checks.clj +++ b/src/clj/auto_ap/graphql/checks.clj @@ -223,7 +223,8 @@ (defn invoice-payments [invoices invoice-amounts] (->> (for [invoice invoices :let [invoice-amount (invoice-amounts (:db/id invoice))] - :when invoice-amount] + :when (and invoice-amount + (not= :invoice-status/voided (:invoice/status invoice)))] [{:invoice-payment/payment (-> invoice :invoice/vendor :db/id str) :invoice-payment/amount invoice-amount :invoice-payment/invoice (:db/id invoice)}