fixing UI for automatically paid when due
This commit is contained in:
@@ -5,7 +5,8 @@
|
|||||||
[datomic.api :as d]
|
[datomic.api :as d]
|
||||||
[auto-ap.datomic :refer [uri remove-nils audit-transact conn]]
|
[auto-ap.datomic :refer [uri remove-nils audit-transact conn]]
|
||||||
[clj-time.coerce :as coerce]
|
[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]
|
(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})
|
{:db/id apwd})
|
||||||
(:automatically_paid_when_due in))]))
|
(:automatically_paid_when_due in))]))
|
||||||
|
|
||||||
|
_ (log/info "Upserting vendor" transaction)
|
||||||
transaction-result (audit-transact transaction (:id context))]
|
transaction-result (audit-transact transaction (:id context))]
|
||||||
|
|
||||||
(-> (d-vendors/get-by-id (or (-> transaction-result :tempids (get "vendor"))
|
(-> (d-vendors/get-by-id (or (-> transaction-result :tempids (get "vendor"))
|
||||||
|
|||||||
@@ -425,6 +425,7 @@
|
|||||||
:client (:client to)
|
:client (:client to)
|
||||||
:override (:terms to)})
|
:override (:terms to)})
|
||||||
%))
|
%))
|
||||||
|
(update :automatically-paid-when-due #(mapv identity %))
|
||||||
(update :hidden #(if (nil? %)
|
(update :hidden #(if (nil? %)
|
||||||
false
|
false
|
||||||
%))
|
%))
|
||||||
|
|||||||
Reference in New Issue
Block a user