fixed small bug which cut away the last digit of the price
This commit is contained in:
parent
d3cd46f5c8
commit
d3f96c348a
2
part.go
2
part.go
@ -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)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user