inverts credit amounts.

This commit is contained in:
Bryce
2023-08-14 10:36:12 -07:00
parent 0ecb5c9516
commit bee7c48e3f

View File

@@ -37,7 +37,7 @@
:id #_{:clj-kondo/ignore [:unresolved-var]} :id #_{:clj-kondo/ignore [:unresolved-var]}
(di/sha-256 (:transaction_id t)) (di/sha-256 (:transaction_id t))
:amount (if (= "credit" (:type (:account t))) :amount (if (= "credit" (:type (:account t)))
(double (:amount t)) (- (double (:amount t)))
(- (double (:amount t)))) (- (double (:amount t))))
:date (coerce/to-date (atime/parse (or (:authorized_date t) (:date t)) atime/iso-date)) :date (coerce/to-date (atime/parse (or (:authorized_date t) (:date t)) atime/iso-date))
:status "POSTED"} :status "POSTED"}