http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9593
--- Comment #5 from mathieu saby <[email protected]> --- Hello > > Your solution will not work on prices with such pattern as : > > 1 000 EUR : > To get it work you must add a space in first alternative here > ( $price ) = $price =~ m/([\d\,\. ]+[\,|\.\d\d]?)/; > and there : > my @parts = split(/[\,\. ]/, $price); You must be right! I only tested on a few records (10 EUR ; 10,50 EUR ; 10.50 EUR) > > 125 € : > You must delete the first part of the routine until the regular expression > (may be it was implied in what you showed ?). > Otherwise, when the symbol had been entered in mysql symbol field as "active > currency" and is typed after the digit(s), the variable $price in $price = > $parts[1] will be undef. > > £ 10 : > I don't know if it could be frequent but in case, the result will be ".10". > To avoid this, I add a mandatory digit at the beginning of regexp and > replace + by * after the first alternative. > Yes, I did not think of symbols... I think Biblibre is going to take part in this discussion. Mathieu -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
