fixing vendors
This commit is contained in:
@@ -120,8 +120,9 @@
|
||||
:requires [:auto-ap/add-account-to-vendor]}
|
||||
:auto-ap/add-credit-bank-account {:txes add-general-ledger/add-credit-bank-account
|
||||
:requires [:auto-ap/add-location-to-transaction]}
|
||||
:auto-ap/add-hidden-to-vendor {:txes-fn `add-general-ledger/add-hidden-to-vendor :requires [:auto-ap/add-credit-bank-account]}
|
||||
:auto-ap/convert-vendors {:txes-fn `add-general-ledger/convert-vendors
|
||||
:requires [:auto-ap/add-location-to-transaction]}
|
||||
:requires [:auto-ap/add-hidden-to-vendor]}
|
||||
:auto-ap/convert-invoices {:txes-fn `add-general-ledger/convert-invoices
|
||||
:requires [:auto-ap/convert-vendors]}
|
||||
|
||||
@@ -129,6 +130,8 @@
|
||||
:auto-ap/add-external-id-to-ledger {:txes add-general-ledger/add-external-id-to-ledger :requires [:auto-ap/add-yodlee-merchant2]}
|
||||
:auto-ap/add-exclude-to-transaction {:txes add-general-ledger/add-exclude-to-transaction :requires [:auto-ap/add-external-id-to-ledger]}
|
||||
:auto-ap/convert-transactions {:txes-fn `add-general-ledger/convert-transactions :requires [:auto-ap/add-external-id-to-ledger]}
|
||||
|
||||
|
||||
#_#_:auto-ap/bulk-load-invoice-ledger3 {:txes-fn `add-general-ledger/bulk-load-invoice-ledger :requires [:auto-ap/convert-transactions]}
|
||||
#_#_:auto-ap/bulk-load-transaction-ledger3 {:txes-fn `add-general-ledger/bulk-load-transaction-ledger :requires [:auto-ap/convert-transactions]}
|
||||
|
||||
|
||||
@@ -308,6 +308,21 @@
|
||||
(def add-credit-bank-account
|
||||
[[{:db/ident :bank-account-type/credit}]])
|
||||
|
||||
(defn add-hidden-to-vendor [conn]
|
||||
[[{:db/ident :vendor/hidden
|
||||
:db/valueType :db.type/boolean
|
||||
:db/cardinality :db.cardinality/one
|
||||
:db/doc "Whether or not to exclude the vendor"}]
|
||||
(let [vendors (d/query {:query {:find '[?v]
|
||||
:in '[$]
|
||||
:where ['[?v :vendor/name]]}
|
||||
:args [(d/db conn)]})]
|
||||
(mapv
|
||||
(fn [[v ]]
|
||||
{:db/id v
|
||||
:vendor/hidden false})
|
||||
vendors))])
|
||||
|
||||
|
||||
|
||||
(defn reset-ledger [conn]
|
||||
|
||||
Reference in New Issue
Block a user