Adds pedantic flag
This commit is contained in:
@@ -17,6 +17,8 @@
|
||||
(java.text DecimalFormat)
|
||||
(java.util UUID)))
|
||||
|
||||
(def ^:dynamic *report-pedantic* false)
|
||||
|
||||
(defn cell->pdf [cell]
|
||||
(let [cell-contents (cond
|
||||
(and (= :dollar (:format cell))
|
||||
@@ -28,7 +30,7 @@
|
||||
(.format (DecimalFormat. "$###,##0.00") (:value cell))
|
||||
|
||||
(= :percent (:format cell))
|
||||
(.format (DecimalFormat. "0%") (:value cell))
|
||||
(.format (DecimalFormat. (if *report-pedantic* "0.00%" "0%")) (:value cell))
|
||||
|
||||
:else
|
||||
(str (:value cell)))]
|
||||
|
||||
Reference in New Issue
Block a user