huge number of changes to start making all usages of expense accounts dynamic.

This commit is contained in:
Bryce Covert
2019-04-12 15:39:32 -07:00
parent e64820d71a
commit b6e73f0bfb
21 changed files with 103 additions and 181 deletions

View File

@@ -8,14 +8,15 @@
[clojure.set :as set]))
(defn upsert-vendor [context {{:keys [id name code print_as primary_contact secondary_contact address default_expense_account invoice_reminder_schedule] :as in} :vendor} value]
(let [transaction [(remove-nils #:vendor {:db/id (if id
(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]
(let [_ (println default_account_id)
transaction [(remove-nils #:vendor {:db/id (if id
id
"vendor")
:name name
:code code
:print-as print_as
:default-expense-account default_expense_account
:default-account default_account_id
:invoice-reminder-schedule (keyword invoice_reminder_schedule)
:address (when address
(remove-nils #:address {:db/id (if (:id address)