fixed small bug which cut away the last digit of the price

This commit is contained in:
Julian Daube 2017-03-20 11:54:08 +01:00
parent d3cd46f5c8
commit d3f96c348a

View File

@ -104,7 +104,7 @@ func (c *Connection) GetPrice(p Part) float32 {
// need to convert german decimals (using ,) to american decimals // need to convert german decimals (using ,) to american decimals
// using . // using .
str := strings.Replace(price[:i-1], ",", ".", 1) str := strings.Replace(price[:i], ",", ".", 1)
ret, _ := strconv.ParseFloat(str, 32) ret, _ := strconv.ParseFloat(str, 32)
return float32(ret) return float32(ret)
} }