Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
my $biblio_authorised_value_images = C4::Items::get_authorised_value_images( C4::Biblio::get_biblio_authorised_values( $oldbiblio->{biblionumber} ) );
$oldbiblio->{authorised_value_images} = $biblio_authorised_value_images;
- my $aisbn = $oldbiblio->{'isbn'};
- $aisbn =~ /(\d*[X]*)/;
- $oldbiblio->{amazonisbn} = $1;
+ (my $aisbn) = $oldbiblio->{isbn} =~ /([\d-]*[X]*)/;
+ $aisbn =~ s/-//g;
+ $oldbiblio->{amazonisbn} = $aisbn;
$oldbiblio->{description} = $itemtypes{ $oldbiblio->{itemtype} }->{description};
# Build summary if there is one (the summary is defined in the itemtypes table)
# FIXME: is this used anywhere, I think it can be commented out? -- JF
# XISBN Stuff
my $xisbn=$dat->{'isbn'};
-$xisbn =~ /(\d*[X]*)/;
-$template->param(amazonisbn => $1); # FIXME: so it is OK if the ISBN = 'XXXXX' ?
+(my $aisbn) = $xisbn =~ /([\d-]*[X]*)/;
+$aisbn =~ s/-//g;
+$template->param(amazonisbn => $aisbn); # FIXME: so it is OK if the ISBN = 'XXXXX' ?
my ($clean,$clean2);
# these might be overkill, but they are better than the regexp above.
if ($clean = isbn_cleanup($xisbn)){