you can set terms
This commit is contained in:
@@ -139,7 +139,11 @@
|
||||
:auto-ap/add-bank-account-locations {:txes add-general-ledger/add-bank-account-locations :requires [:auto-ap/add-transaction-rules]}
|
||||
|
||||
:auto-ap/convert-transactions {:txes-fn `add-general-ledger/convert-transactions :requires [:auto-ap/add-bank-account-locations]}
|
||||
:auto-ap/add-exclude-to-invoice {:txes add-general-ledger/add-exclude-to-invoice :requires [:auto-ap/convert-transactions]}}]
|
||||
:auto-ap/add-exclude-to-invoice {:txes add-general-ledger/add-exclude-to-invoice :requires [:auto-ap/convert-transactions]}
|
||||
:auto-ap/add-terms {:txes [[{:db/ident :vendor/terms
|
||||
:db/doc "How many days till you pay"
|
||||
:db/valueType :db.type/long
|
||||
:db/cardinality :db.cardinality/one}]]}}]
|
||||
(println "Conforming database...")
|
||||
(c/ensure-conforms conn norms-map)
|
||||
(when (not (seq args))
|
||||
|
||||
@@ -114,6 +114,7 @@
|
||||
{:fields {:id {:type :id}
|
||||
:name {:type 'String}
|
||||
:code {:type 'String}
|
||||
:terms {:type 'Int}
|
||||
:hidden {:type 'Boolean}
|
||||
|
||||
:print_as {:type 'String}
|
||||
@@ -517,6 +518,7 @@
|
||||
:add_vendor
|
||||
{:fields {:id {:type :id}
|
||||
:name {:type 'String}
|
||||
:terms {:type 'Int}
|
||||
:code {:type 'String}
|
||||
|
||||
:hidden {:type 'Boolean}
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
[clojure.set :as set]))
|
||||
|
||||
|
||||
(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]
|
||||
(defn upsert-vendor [context {{:keys [id name hidden terms 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
|
||||
@@ -16,6 +16,7 @@
|
||||
:name name
|
||||
:code code
|
||||
:hidden hidden
|
||||
:terms terms
|
||||
:print-as print_as
|
||||
:default-account default_account_id
|
||||
:invoice-reminder-schedule (keyword invoice_reminder_schedule)
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
[:accounts [:numeric-code :location :name :type :account_set :id]]]}
|
||||
:on-success [::received-initial]}}))))
|
||||
(def vendor-query
|
||||
[:id :name :hidden [:default-account [:name :id :location]]
|
||||
[:id :name :hidden :terms [:default-account [:name :id :location]]
|
||||
[:primary-contact [:name :phone :email :id]]
|
||||
[:secondary-contact [:id :name :phone :email]]
|
||||
:print-as :invoice-reminder-schedule :code
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
:on-success [::save-complete]
|
||||
:on-error [::forms/save-error ::vendor-form]}})))
|
||||
|
||||
(defn vendor-dialog [{:keys [save-event] {:keys [name]} :vendor}]
|
||||
(defn vendor-dialog [{:keys [save-event] }]
|
||||
|
||||
(let [clients-by-id @(re-frame/subscribe [::subs/clients-by-id])
|
||||
all-vendors @(re-frame/subscribe [::subs/vendors])
|
||||
|
||||
Reference in New Issue
Block a user