tons of bug fixes
This commit is contained in:
@@ -33,8 +33,13 @@
|
||||
|
||||
(defmethod entity-change->ledger :invoice
|
||||
[db [type id]]
|
||||
(let [entity (d/pull db ['* {:invoice/vendor '[*] :invoice/payment '[*]}] id)]
|
||||
(when-not (= true (:invoice/exclude-from-ledger entity))
|
||||
(let [entity (d/pull db ['* {:invoice/vendor '[*]
|
||||
:invoice/payment '[*]
|
||||
:invoice/status '[:db/ident]
|
||||
: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))))
|
||||
(remove-nils
|
||||
{:journal-entry/source "invoice"
|
||||
:journal-entry/client (:db/id (:invoice/client entity))
|
||||
@@ -157,3 +162,5 @@
|
||||
#_(process-one (d/tx-report-queue (d/connect uri) ))
|
||||
|
||||
#_(process-all)
|
||||
|
||||
#_(reset! break true)
|
||||
|
||||
Reference in New Issue
Block a user