[Koha-bugs] [Bug 12310] Accept different monetary formats as input

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Apr 6 15:43:09 CEST 2018


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12310

--- Comment #60 from Victor Grousset/tuxayo <victor.grousset at biblibre.com> ---
(In reply to M. Tompsett from comment #58)
> The function name is decimal_from_string. It's not intuitive to return false. 

It doesn't make sense to return false, removing it.

> Also, why do a is_decimal check in this function and the calling function?

Because I missed this when refactoring the legacy patch ^^ Thanks for catching
this :)

> Just do the assignment, and make sure the decimal_from_string returns what was passed, if it isn't a decimal.

It doesn't touch the content when the input isn't a number.
I feared that there might cases where this could be confusing or annoying. (to
always unformat the field)
I wasn't confident enough that I wouldn't create edge cases issues.

But other opinions are welcome and I will change that if we consider safe to
always unformat the field.
After considering that this feature could be used on all decimal fields of
Koha.

> placeholder="Example 5.00"

When the syspref equals "," to use the dots as thousand separators.
Then this placeholder or tip wouldn't make sense.


Has everything be addressed?

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list