diff --git a/src/clj/auto_ap/graphql/invoices.clj b/src/clj/auto_ap/graphql/invoices.clj index 9f7705a3..5f7a53fa 100644 --- a/src/clj/auto_ap/graphql/invoices.clj +++ b/src/clj/auto_ap/graphql/invoices.clj @@ -60,8 +60,7 @@ (assert-power-user (:id context)) (doseq [i invoices] (assert-can-see-client (:id context) (:db/id (:invoice/client (dc/pull (dc/db conn) [{:invoice/client [:db/id]}] i))))) - (let [transactions (mapcat (fn [i] [[:db/retractEntity i] - [:db/retractEntity [:journal-entry/original-invoice i]]]) + (let [transactions (mapcat (fn [i] [[:db/retractEntity i]]) invoices)] (audit-transact transactions (:id context)) invoices)) diff --git a/src/clj/auto_ap/graphql/ledger.clj b/src/clj/auto_ap/graphql/ledger.clj index 13fa5ad0..77c3f03d 100644 --- a/src/clj/auto_ap/graphql/ledger.clj +++ b/src/clj/auto_ap/graphql/ledger.clj @@ -532,7 +532,7 @@ #_(log/info (map :tx success)) (mu/trace ::success-tx [:count (count success)] - (doseq [n (:tempids (audit-transact-batch (map :tx success) (:id context)))] + (doseq [[_ n] (:tempids (audit-transact-batch (map :tx success) (:id context)))] (solr/touch n))) {:successful (map (fn [x] {:external_id (:external_id x)}) success)