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