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/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/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...")
|
(println "Conforming database...")
|
||||||
(c/ensure-conforms conn norms-map)
|
(c/ensure-conforms conn norms-map)
|
||||||
(when (not (seq args))
|
(when (not (seq args))
|
||||||
|
|||||||
@@ -114,6 +114,7 @@
|
|||||||
{:fields {:id {:type :id}
|
{:fields {:id {:type :id}
|
||||||
:name {:type 'String}
|
:name {:type 'String}
|
||||||
:code {:type 'String}
|
:code {:type 'String}
|
||||||
|
:terms {:type 'Int}
|
||||||
:hidden {:type 'Boolean}
|
:hidden {:type 'Boolean}
|
||||||
|
|
||||||
:print_as {:type 'String}
|
:print_as {:type 'String}
|
||||||
@@ -517,6 +518,7 @@
|
|||||||
:add_vendor
|
:add_vendor
|
||||||
{:fields {:id {:type :id}
|
{:fields {:id {:type :id}
|
||||||
:name {:type 'String}
|
:name {:type 'String}
|
||||||
|
:terms {:type 'Int}
|
||||||
:code {:type 'String}
|
:code {:type 'String}
|
||||||
|
|
||||||
:hidden {:type 'Boolean}
|
:hidden {:type 'Boolean}
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
[clojure.set :as set]))
|
[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)
|
(let [_ (println default_account_id)
|
||||||
transaction [(remove-nils #:vendor {:db/id (if id
|
transaction [(remove-nils #:vendor {:db/id (if id
|
||||||
id
|
id
|
||||||
@@ -16,6 +16,7 @@
|
|||||||
:name name
|
:name name
|
||||||
:code code
|
:code code
|
||||||
:hidden hidden
|
:hidden hidden
|
||||||
|
:terms terms
|
||||||
:print-as print_as
|
:print-as print_as
|
||||||
:default-account default_account_id
|
:default-account default_account_id
|
||||||
:invoice-reminder-schedule (keyword invoice_reminder_schedule)
|
:invoice-reminder-schedule (keyword invoice_reminder_schedule)
|
||||||
|
|||||||
@@ -52,7 +52,7 @@
|
|||||||
[:accounts [:numeric-code :location :name :type :account_set :id]]]}
|
[:accounts [:numeric-code :location :name :type :account_set :id]]]}
|
||||||
:on-success [::received-initial]}}))))
|
:on-success [::received-initial]}}))))
|
||||||
(def vendor-query
|
(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]]
|
[:primary-contact [:name :phone :email :id]]
|
||||||
[:secondary-contact [:id :name :phone :email]]
|
[:secondary-contact [:id :name :phone :email]]
|
||||||
:print-as :invoice-reminder-schedule :code
|
:print-as :invoice-reminder-schedule :code
|
||||||
|
|||||||
@@ -69,7 +69,7 @@
|
|||||||
:on-success [::save-complete]
|
:on-success [::save-complete]
|
||||||
:on-error [::forms/save-error ::vendor-form]}})))
|
: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])
|
(let [clients-by-id @(re-frame/subscribe [::subs/clients-by-id])
|
||||||
all-vendors @(re-frame/subscribe [::subs/vendors])
|
all-vendors @(re-frame/subscribe [::subs/vendors])
|
||||||
|
|||||||
Reference in New Issue
Block a user