Lines 21-26
use Modern::Perl;
Link Here
|
21 |
use CGI qw ( -utf8 ); |
21 |
use CGI qw ( -utf8 ); |
22 |
use C4::Auth qw( get_template_and_user ); |
22 |
use C4::Auth qw( get_template_and_user ); |
23 |
use C4::Biblio qw( GetMarcBiblio ); |
23 |
use C4::Biblio qw( GetMarcBiblio ); |
|
|
24 |
use C4::Circulation qw( barcodedecode ); |
24 |
use C4::Koha qw( |
25 |
use C4::Koha qw( |
25 |
GetNormalizedEAN |
26 |
GetNormalizedEAN |
26 |
GetNormalizedISBN |
27 |
GetNormalizedISBN |
Lines 154-160
if ( $op eq 'add_form' ) {
Link Here
|
154 |
if ( $shelf->can_biblios_be_added( $loggedinuser ) ) { |
155 |
if ( $shelf->can_biblios_be_added( $loggedinuser ) ) { |
155 |
my @barcodes = split /\n/, $barcodes; # Entries are effectively passed in as a <cr> separated list |
156 |
my @barcodes = split /\n/, $barcodes; # Entries are effectively passed in as a <cr> separated list |
156 |
foreach my $barcode (@barcodes){ |
157 |
foreach my $barcode (@barcodes){ |
157 |
$barcode =~ s/\r$//; # strip any naughty return chars |
158 |
$barcode =~ s/^\s+//; # remove leading whitespace |
|
|
159 |
$barcode =~ s/\s+$//; # remove trailing whitespace |
160 |
$barcode = barcodedecode( $barcode ) if $barcode; |
158 |
next if $barcode eq ''; |
161 |
next if $barcode eq ''; |
159 |
my $item = Koha::Items->find({barcode => $barcode}); |
162 |
my $item = Koha::Items->find({barcode => $barcode}); |
160 |
if ( $item ) { |
163 |
if ( $item ) { |
161 |
- |
|
|