View | Details | Raw Unified | Return to bug 30840
Collapse All | Expand All

(-)a/course_reserves/add_items.pl (+2 lines)
Lines 23-28 use Modern::Perl; Link Here
23
use CGI qw ( -utf8 );
23
use CGI qw ( -utf8 );
24
24
25
use C4::Auth qw( get_template_and_user );
25
use C4::Auth qw( get_template_and_user );
26
use C4::Circulation qw( barcodedecode );
26
use C4::Output qw( output_html_with_http_headers );
27
use C4::Output qw( output_html_with_http_headers );
27
use C4::Koha qw( GetAuthorisedValues );
28
use C4::Koha qw( GetAuthorisedValues );
28
use Koha::Items;
29
use Koha::Items;
Lines 43-48 my $is_edit = $cgi->param('is_edit') || ''; Link Here
43
my $biblionumber = $cgi->param('biblionumber') || '';
44
my $biblionumber = $cgi->param('biblionumber') || '';
44
45
45
$barcode =~ s/^\s*|\s*$//g; #remove leading/trailing whitespace
46
$barcode =~ s/^\s*|\s*$//g; #remove leading/trailing whitespace
47
$barcode = barcodedecode($barcode) if $barcode;
46
$biblionumber =~ s/^\s*|\s*$//g; #remove leading/trailing whitespace
48
$biblionumber =~ s/^\s*|\s*$//g; #remove leading/trailing whitespace
47
49
48
my ( $item, $biblio );
50
my ( $item, $biblio );
(-)a/course_reserves/batch_add_items.pl (+2 lines)
Lines 24-29 use CGI qw( -utf8 ); Link Here
24
use List::MoreUtils qw( uniq );
24
use List::MoreUtils qw( uniq );
25
25
26
use C4::Auth qw( get_template_and_user );
26
use C4::Auth qw( get_template_and_user );
27
use C4::Circulation qw( barcodedecode );
27
use C4::Output qw( output_html_with_http_headers );
28
use C4::Output qw( output_html_with_http_headers );
28
use C4::CourseReserves qw( GetCourse ModCourse ModCourseItem ModCourseReserve );
29
use C4::CourseReserves qw( GetCourse ModCourse ModCourseItem ModCourseReserve );
29
30
Lines 73-78 if ( $course_id && $course ) { Link Here
73
            my @items;
74
            my @items;
74
            my @invalid_barcodes;
75
            my @invalid_barcodes;
75
            for my $b (@barcodes) {
76
            for my $b (@barcodes) {
77
                $b = barcodedecode($b) if $b;
76
                my $item = Koha::Items->find( { barcode => $b } );
78
                my $item = Koha::Items->find( { barcode => $b } );
77
79
78
                if ($item) {
80
                if ($item) {
(-)a/course_reserves/batch_rm_items.pl (-1 / +2 lines)
Lines 23-28 use CGI qw( -utf8 ); Link Here
23
use List::MoreUtils qw( uniq );
23
use List::MoreUtils qw( uniq );
24
24
25
use C4::Auth qw( get_template_and_user );
25
use C4::Auth qw( get_template_and_user );
26
use C4::Circulation qw( barcodedecode );
26
use C4::Output qw( output_html_with_http_headers );
27
use C4::Output qw( output_html_with_http_headers );
27
use C4::CourseReserves qw( GetCourse GetCourseItem GetItemCourseReservesInfo DelCourse DelCourseReserve );
28
use C4::CourseReserves qw( GetCourse GetCourseItem GetItemCourseReservesInfo DelCourse DelCourseReserve );
28
29
Lines 52-57 elsif ( $action eq 'batch_rm' ) { Link Here
52
    my @item_and_count;
53
    my @item_and_count;
53
54
54
    foreach my $bar (@barcodes) {
55
    foreach my $bar (@barcodes) {
56
        $bar = barcodedecode($bar) if $bar;
55
        my $item = Koha::Items->find( { barcode => $bar } );
57
        my $item = Koha::Items->find( { barcode => $bar } );
56
        if($item) {
58
        if($item) {
57
            my $courseitem = GetCourseItem(itemnumber => $item->id);
59
            my $courseitem = GetCourseItem(itemnumber => $item->id);
58
- 

Return to bug 30840