[Koha-bugs] [Bug 9593] Prices not imported correctly from a staged file

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Feb 12 17:13:51 CET 2013


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9593

--- Comment #3 from mathieu saby <mathieu.saby at univ-rennes2.fr> ---
My solution was changing these lines in MungeMarcPrice routine:

- ( $price ) = $price =~ m/([\d\,\.]+[[\,\.]\d\d]?)/;
+ ( $price ) = $price =~ m/([\d\,\.]+[\,|\.\d\d]?)/;
     ## Split price into array on periods and commas
     my @parts = split(/[\,\.]/, $price);
     ## If the last grouping of digits is more than 2 characters, assume there
is no decimal value and put it back.
     my $decimal = pop( @parts );
- if ( length( $decimal ) > 2 ) {
+ if ((scalar @parts == 0) or ( length( $decimal ) > 2 )) { 




M. Saby

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


More information about the Koha-bugs mailing list