refactor(charts): unify on Chart.js, remove Chartist #10
@@ -444,18 +444,18 @@
|
||||
(com/data-grid-cell {:class "text-right"} [:span.font-bold.text-right "TOTAL"])
|
||||
(com/data-grid-cell {:id "total"
|
||||
:class "text-right"}
|
||||
(format "$%,.2f" (reduce + 0 (map :transaction-account/amount accounts))))
|
||||
(format "$%,.2f" (double (reduce + 0.0 (map :transaction-account/amount accounts)))))
|
||||
(com/data-grid-cell {}))
|
||||
(com/data-grid-row {}
|
||||
(com/data-grid-cell {})
|
||||
(com/data-grid-cell {:class "text-right"} [:span.font-bold.text-right "BALANCE"])
|
||||
(com/data-grid-cell {:id "total"
|
||||
:class "text-right"}
|
||||
(let [account-total (reduce + 0 (map :transaction-account/amount accounts))
|
||||
(let [account-total (double (reduce + 0.0 (map :transaction-account/amount accounts)))
|
||||
balance (- total account-total)]
|
||||
[:span {:class (when-not (dollars= 0.0 balance)
|
||||
"text-red-300")}
|
||||
(format "$%,.2f" balance)]))
|
||||
(format "$%,.2f" (double balance))]))
|
||||
(com/data-grid-cell {}))
|
||||
(com/data-grid-row {}
|
||||
(com/data-grid-cell {})
|
||||
|
||||
Reference in New Issue
Block a user