fixes
This commit is contained in:
@@ -35,7 +35,7 @@
|
||||
:invoice/payment '[*]
|
||||
:invoice/status '[:db/ident]
|
||||
:invoice/import-status '[:db/ident]}] id)
|
||||
credit-invoice? (< (:invoice/total entity) 0.0)]
|
||||
credit-invoice? (< (:invoice/total entity 0.0) 0.0)]
|
||||
(when-not (or
|
||||
(not (:invoice/total entity))
|
||||
(= true (:invoice/exclude-from-ledger entity))
|
||||
@@ -188,17 +188,20 @@
|
||||
|
||||
(defn touch-transaction [e]
|
||||
@(d/transact conn [[:db/retractEntity [:journal-entry/original-entity e]]])
|
||||
@(d/transact conn [{:db/id "datomic.tx"
|
||||
:db/doc "touching transaction to update ledger"}
|
||||
(entity-change->ledger (d/db conn)
|
||||
[:transaction e])]))
|
||||
(when-let [change (entity-change->ledger (d/db conn)
|
||||
[:transaction e])]
|
||||
@(d/transact conn [{:db/id "datomic.tx"
|
||||
:db/doc "touching transaction to update ledger"}
|
||||
change])))
|
||||
|
||||
(defn touch-invoice [e]
|
||||
@(d/transact conn [[:db/retractEntity [:journal-entry/original-entity e]]])
|
||||
@(d/transact conn [{:db/id "datomic.tx"
|
||||
:db/doc "touching invoice to update ledger"}
|
||||
(entity-change->ledger (d/db conn)
|
||||
[:invoice e])]))
|
||||
(when-let [change (entity-change->ledger (d/db conn)
|
||||
[:invoice e])]
|
||||
@(d/transact conn [{:db/id "datomic.tx"
|
||||
:db/doc "touching invoice to update ledger"}
|
||||
change])))
|
||||
|
||||
(defn mismatched-transactions
|
||||
([]
|
||||
(mismatched-transactions (c/to-date (t/minus (t/now) (t/days 7)))
|
||||
|
||||
Reference in New Issue
Block a user