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