remove excluded from ledger.
This commit is contained in:
@@ -58,6 +58,7 @@
|
||||
[db [type id]]
|
||||
(let [entity (d/pull db ['* {:transaction/vendor '[*]
|
||||
:transaction/client '[*]
|
||||
:transaction/approval-status '[*]
|
||||
:transaction/bank-account '[* {:bank-account/type [:db/ident]}]
|
||||
:transaction/accounts '[*
|
||||
{:transaction-account/account [*]}] }] id)
|
||||
@@ -65,7 +66,7 @@
|
||||
decreasing? (< (:transaction/amount entity) 0.0)
|
||||
credit-from-bank? decreasing?
|
||||
debit-from-bank? (not decreasing?)]
|
||||
(when-not (:transaction/exclude-from-ledger entity)
|
||||
(when-not (= :transaction-approval-status/excluded (:db/ident (:transaction/approval-status entity)))
|
||||
(remove-nils
|
||||
{:journal-entry/source "transaction"
|
||||
:journal-entry/client (:db/id (:transaction/client entity))
|
||||
|
||||
Reference in New Issue
Block a user