Makes it so vendors and invoices respect allowances.

This commit is contained in:
2023-02-03 20:59:52 -08:00
parent 1ecd076ba1
commit afa6b79fcc
7 changed files with 82 additions and 33 deletions

View File

@@ -183,7 +183,8 @@
(d/db conn))
(map (fn [i]
{:db/id i
:account/vendor-allowance :allowance/allowed})))
:account/vendor-allowance :allowance/allowed
:account/default-allowance :allowance/allowed})))
])
@@ -568,15 +569,19 @@
:requires [:auto-ap/add-account-options]}
:auto-ap/add-vendor-account-options {:txes [[{:db/ident :account/vendor-allowance
:auto-ap/add-vendor-account-options2 {:txes [[{:db/ident :account/vendor-allowance
:db/valueType :db.type/ref
:db/cardinality :db.cardinality/one
:db/doc "Whether this account can be used for vendors"}
{:db/ident :account/default-allowance
:db/valueType :db.type/ref
:db/cardinality :db.cardinality/one
:db/doc "Whether this account can be used generally"}
]]
:requires [:auto-ap/backfill-account-options]}
:auto-ap/backfill-account-options2 {:txes-fn `backfill-account-options2
:auto-ap/backfill-account-options3 {:txes-fn `backfill-account-options2
:requires [:auto-ap/add-vendor-account-options]}}
:requires [:auto-ap/add-vendor-account-options2]}}