From 473b2c34c8e94f8b234d0439de2b4c15106e3484 Mon Sep 17 00:00:00 2001 From: Bryce Date: Mon, 3 Feb 2025 19:43:56 -0800 Subject: [PATCH] fixes adding new ledger --- src/clj/auto_ap/ssr/ledger/new.clj | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/clj/auto_ap/ssr/ledger/new.clj b/src/clj/auto_ap/ssr/ledger/new.clj index bfcb33f2..c1f8bc63 100644 --- a/src/clj/auto_ap/ssr/ledger/new.clj +++ b/src/clj/auto_ap/ssr/ledger/new.clj @@ -294,13 +294,13 @@ (update :journal-entry/client :db/id) (update :journal-entry/vendor :db/id) (update :journal-entry/line-items - (fn [li] + (fn [lis] (mapv #(remove-nils (-> % (update :journal-entry-line/account :db/id) (assoc :journal-entry-line/client (-> request :form-params :journal-entry/client :db/id) - :journal-entry-line/date (-> request :form-params :journal-entry/date coerce/to-date))) - li)))) + :journal-entry-line/date (-> request :form-params :journal-entry/date coerce/to-date)))) + lis))) (assoc :journal-entry/external-id (str "manual-" (UUID/randomUUID)))) (= :post (:request-method request)) (assoc :db/id "new")) {:keys [tempids]} (audit-transact [[:upsert-entity entity]