fixing vendors

This commit is contained in:
Bryce Covert
2019-05-05 01:00:30 -07:00
parent d63bb566dc
commit 3dafdd66c2
10 changed files with 56 additions and 9 deletions

View File

@@ -8,13 +8,14 @@
[clojure.set :as set]))
(defn upsert-vendor [context {{:keys [id name code print_as primary_contact secondary_contact address default_account_id invoice_reminder_schedule] :as in} :vendor} value]
(defn upsert-vendor [context {{:keys [id name hidden code print_as primary_contact secondary_contact address default_account_id invoice_reminder_schedule] :as in} :vendor} value]
(let [_ (println default_account_id)
transaction [(remove-nils #:vendor {:db/id (if id
id
"vendor")
:name name
:code code
:hidden hidden
:print-as print_as
:default-account default_account_id
:invoice-reminder-schedule (keyword invoice_reminder_schedule)