fixes cash pay issue.
This commit is contained in:
@@ -163,3 +163,19 @@ best
|
||||
(dc/db conn)))]
|
||||
[:db/retractEntity bad])
|
||||
{:user/name "fix-unused-vendors"})
|
||||
|
||||
|
||||
|
||||
(user/init-repl)
|
||||
|
||||
(seq (datomic.api/q '[:find ?v ?vn ?code ?a
|
||||
:in $ [?v ...] [?a ...]
|
||||
:where [?x ?a ?v]
|
||||
[?v :vendor/name ?vn]
|
||||
[?x :journal-entry/client ?c]
|
||||
[?c :client/code ?code]]
|
||||
(datomic.api/db auto-ap.datomic/conn)
|
||||
[17592298912094 17592298933107 17592299151482]
|
||||
#{:expected-deposit/vendor, :invoice/vendor, :journal-entry/vendor, :payment/vendor, :sales-order/vendor, :sales-refund/vendor, :transaction/vendor, :transaction-rule/vendor, :cash-drawer-shift/vendor}
|
||||
|
||||
))
|
||||
|
||||
@@ -366,7 +366,8 @@
|
||||
:transaction/description-original memo
|
||||
:transaction/date (:payment/date payment)
|
||||
:transaction/approval-status :transaction-approval-status/approved
|
||||
:transaction/accounts [{:transaction-account/account (:db/id (a/get-account-by-numeric-code-and-sets 21000 ["default"]))
|
||||
:transaction/accounts [{:db/id (str "transaction-account-" (:db/id vendor))
|
||||
:transaction-account/account (:db/id (a/get-account-by-numeric-code-and-sets 21000 ["default"]))
|
||||
:transaction-account/location "A"
|
||||
:transaction-account/amount (Math/abs (:payment/amount base-payment))}]}]]
|
||||
(-> []
|
||||
|
||||
@@ -535,7 +535,7 @@
|
||||
[:count (count success)]
|
||||
(for [[_ n] (:tempids (audit-transact-batch (map :tx success) (:id context)))]
|
||||
n))]
|
||||
(future
|
||||
(future ;
|
||||
(mu/log ::indexing-solr :count (count invalidated))
|
||||
(mu/trace ::indexed-external-solr
|
||||
[:count (count invalidated)]
|
||||
|
||||
Reference in New Issue
Block a user