fixing UI for automatically paid when due

This commit is contained in:
Bryce Covert
2021-01-23 09:44:53 -08:00
parent c58608eca0
commit cb33e1e54a
2 changed files with 4 additions and 1 deletions

View File

@@ -5,7 +5,8 @@
[datomic.api :as d]
[auto-ap.datomic :refer [uri remove-nils audit-transact conn]]
[clj-time.coerce :as coerce]
[clojure.set :as set]))
[clojure.set :as set]
[clojure.tools.logging :as log]))
(defn upsert-vendor [context {{:keys [id name hidden terms code print_as primary_contact secondary_contact address default_account_id invoice_reminder_schedule schedule_payment_dom terms_overrides account_overrides] :as in} :vendor} value]
@@ -87,6 +88,7 @@
{:db/id apwd})
(:automatically_paid_when_due in))]))
_ (log/info "Upserting vendor" transaction)
transaction-result (audit-transact transaction (:id context))]
(-> (d-vendors/get-by-id (or (-> transaction-result :tempids (get "vendor"))

View File

@@ -425,6 +425,7 @@
:client (:client to)
:override (:terms to)})
%))
(update :automatically-paid-when-due #(mapv identity %))
(update :hidden #(if (nil? %)
false
%))