https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21507 --- Comment #13 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- (In reply to Henri-Damien LAURENT from comment #12)
Your solution seems to fit your environment. But let me state that some countries, like France have different signs for thousand delimiter and decimal delimiter.
And I can see no real support for those "oddities" in the proposed js code. Worse, there seems to be no way to parametrize those 'locales' for currency.
For instance, if someone copy pastes 123,13 €, it would be converted into 12,313.00 which is counter intuitive for usual french folks.
To that aim, decimal_fill (hardcoded at the moment in Koha::Number::Price could be parametrized). And the way the proposed patch fixed that would take a system variable for number format into account. So it has my favour.
Can it be discussed some time ?
More than happy to discuss.. I'm a little confused by your comment though.. are you replying to the code attached here or the algorithm I propose in comment 10. Unfortunately, I've not had a moment to actually try to realise the code to match that algorithm yet.
Moreover, it seems that there is no way to add more decimals... (which should be enable for some rates, if there is a fine per page printed for instance, it could be 0.013 cents per page)
I can see this being an issue with my algorithm, though I don't expect the algorithm to be applied to all inputs.. only those that may be pasted into.. for this case I would expect a typed amount and we should allow parts of a cent. (admittedly, I've never actually come across a scheme like this.. koha doesn't support a 'fine per page' rule anywhere currently unless I'm mistaken? -- You are receiving this mail because: You are watching all bug changes.