ledger final fixes
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
[auto-ap.datomic.accounts :as a]
|
||||
[auto-ap.datomic :refer [uri remove-nils conn]]
|
||||
[clojure.spec.alpha :as s]
|
||||
[auto-ap.utils :refer [dollars-0?] ]
|
||||
[clojure.tools.logging :as log]
|
||||
[auto-ap.logging :refer [info-event]]
|
||||
[unilog.context :as lc]))
|
||||
@@ -45,7 +46,8 @@
|
||||
:invoice/import-status '[:db/ident]}] id)]
|
||||
(when-not (or (= true (:invoice/exclude-from-ledger entity))
|
||||
(= :import-status/pending (:db/ident (:invoice/import-status entity)))
|
||||
(= :invoice-status/voided (:db/ident (:invoice/status entity))))
|
||||
(= :invoice-status/voided (:db/ident (:invoice/status entity)))
|
||||
(dollars-0? (:invoice/total entity)))
|
||||
(remove-nils
|
||||
{:journal-entry/source "invoice"
|
||||
:journal-entry/client (:db/id (:invoice/client entity))
|
||||
@@ -78,7 +80,8 @@
|
||||
decreasing? (< (:transaction/amount entity) 0.0)
|
||||
credit-from-bank? decreasing?
|
||||
debit-from-bank? (not decreasing?)]
|
||||
(when-not (= :transaction-approval-status/excluded (:db/ident (:transaction/approval-status entity)))
|
||||
(when-not (or (= :transaction-approval-status/excluded (:db/ident (:transaction/approval-status entity)))
|
||||
(dollars-0? (:transaction/amount entity)))
|
||||
(remove-nils
|
||||
{:journal-entry/source "transaction"
|
||||
:journal-entry/client (:db/id (:transaction/client entity))
|
||||
|
||||
Reference in New Issue
Block a user