|
@@ -1263,10 +1263,6 @@ func getDecimalLen(str string, isPercent bool) (decimalPlaces int) {
|
|
|
}
|
|
|
|
|
|
func roundNumber(num string, decimalPlaces int, hasPercent bool) string {
|
|
|
- if strings.Contains(num, "%") {
|
|
|
- hasPercent = true
|
|
|
- num = strings.Trim(num, "%")
|
|
|
- }
|
|
|
numFloat, _ := strconv.ParseFloat(num, 64)
|
|
|
numFloat, _ = decimal.NewFromFloat(numFloat).Round(int32(decimalPlaces)).Float64()
|
|
|
|