Fixing mismatched reconciliation bug
This commit is contained in:
@@ -175,6 +175,8 @@
|
||||
(let [txes-missing-ledger-entries (->> (d/query {:query {:find ['?t ]
|
||||
:in ['$]
|
||||
:where ['[?t :transaction/date]
|
||||
'[?t :transaction/amount ?amt]
|
||||
'[(not= 0.0 ?amt)]
|
||||
'(not [?t :transaction/approval-status :transaction-approval-status/excluded])
|
||||
'(not-join [?t] [?e :journal-entry/original-entity ?t])]}
|
||||
:args [(d/db conn)]})
|
||||
@@ -185,6 +187,8 @@
|
||||
invoices-missing-ledger-entries (->> (d/query {:query {:find ['?t ]
|
||||
:in ['$]
|
||||
:where ['[?t :invoice/date]
|
||||
'[?t :invoice/total ?amt]
|
||||
'[(not= 0.0 ?amt)]
|
||||
'(not [?t :invoice/status :invoice-status/voided])
|
||||
'(not [?t :invoice/import-status :import-status/pending])
|
||||
'(not [?t :invoice/exclude-from-ledger true])
|
||||
@@ -247,7 +251,9 @@
|
||||
'(not [?e :transaction/approval-status :transaction-approval-status/excluded])
|
||||
'[?li :transaction-account/account ?lia]
|
||||
|
||||
'[?lia :account/name]]}
|
||||
'[?lia :account/name]
|
||||
'[?e :transaction/amount ?amt]
|
||||
'[(not= ?amt 0.0)]]}
|
||||
:args [(d/db auto-ap.datomic/conn)]}))
|
||||
]
|
||||
(filter
|
||||
|
||||
Reference in New Issue
Block a user