From 273e9685ccb088553417a5e5f27a9235e87e2989 Mon Sep 17 00:00:00 2001 From: Bryce Covert Date: Mon, 16 Jan 2023 10:05:51 -0800 Subject: [PATCH] fix exception that Brian found. --- src/clj/auto_ap/ssr/company/company_1099.clj | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/src/clj/auto_ap/ssr/company/company_1099.clj b/src/clj/auto_ap/ssr/company/company_1099.clj index 4f6bc525..b1d21fae 100644 --- a/src/clj/auto_ap/ssr/company/company_1099.clj +++ b/src/clj/auto_ap/ssr/company/company_1099.clj @@ -24,8 +24,19 @@ (map first) set)] (->> (d/q '[:find - ?c - ?v + (pull ?c [:client/code :db/id]) + (pull ?v [:db/id + :vendor/name + {:vendor/legal-entity-1099-type [:db/ident]} + {:vendor/legal-entity-tin-type [:db/ident]} + {:vendor/address [:address/street1 + :address/city + :address/state + :address/zip]} + :vendor/legal-entity-first-ein + :vendor/legal-entity-first-name + :vendor/legal-entity-middle-name + :vendor/legal-entity-last-name]) (sum ?a) :with ?d :in $ @@ -40,12 +51,11 @@ ) (filter (fn [[_ _ a]] (>= (or a 0.0) 600.0))) - (filter (comp clients first)) + (filter (comp clients :db/id first)) (take 200) (sort-by (fn [[client _ amount]] - [client amount]) )))) - + [(:client/code client ) amount]) )))) (defn dialog [header content footer] [:div.modal.is-active