Lines 26-31
use C4::Auth;
Link Here
|
26 |
use C4::Output; |
26 |
use C4::Output; |
27 |
use C4::Koha; |
27 |
use C4::Koha; |
28 |
use C4::Biblio; |
28 |
use C4::Biblio; |
|
|
29 |
use Koha::Items; |
29 |
|
30 |
|
30 |
use C4::CourseReserves qw(GetCourse GetCourseItem GetCourseReserve ModCourseItem ModCourseReserve); |
31 |
use C4::CourseReserves qw(GetCourse GetCourseItem GetCourseReserve ModCourseItem ModCourseReserve); |
31 |
|
32 |
|
Lines 37-43
my $barcode = $cgi->param('barcode') || '';
Link Here
|
37 |
my $return = $cgi->param('return') || ''; |
38 |
my $return = $cgi->param('return') || ''; |
38 |
my $itemnumber = ($cgi->param('itemnumber') && $action eq 'lookup') ? $cgi->param('itemnumber') : ''; |
39 |
my $itemnumber = ($cgi->param('itemnumber') && $action eq 'lookup') ? $cgi->param('itemnumber') : ''; |
39 |
|
40 |
|
40 |
my $item = GetBiblioFromItemNumber( $itemnumber, $barcode ); |
41 |
my $item = Koha::Items->find( { ( $itemnumber ? ( itemnumber => $itemnumber ) : ( barcode => $barcode ) ) } ); |
|
|
42 |
my $title = ($item) ? $item->biblio->title : undef; |
41 |
|
43 |
|
42 |
my $step = ( $action eq 'lookup' && $item ) ? '2' : '1'; |
44 |
my $step = ( $action eq 'lookup' && $item ) ? '2' : '1'; |
43 |
|
45 |
|
Lines 50-56
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
Link Here
|
50 |
flagsrequired => { coursereserves => 'add_reserves' }, |
52 |
flagsrequired => { coursereserves => 'add_reserves' }, |
51 |
} |
53 |
} |
52 |
); |
54 |
); |
53 |
my $inumber = $itemnumber ? "<blank> (itemnumber:$itemnumber)" : ""; |
55 |
my $inumber = $itemnumber ? "(blank) (itemnumber:$itemnumber)" : ""; |
54 |
$template->param( ERROR_BARCODE_NOT_FOUND => $barcode . $inumber ) |
56 |
$template->param( ERROR_BARCODE_NOT_FOUND => $barcode . $inumber ) |
55 |
unless ( $barcode && !$itemnumber && $item && $action eq 'lookup' ); |
57 |
unless ( $barcode && !$itemnumber && $item && $action eq 'lookup' ); |
56 |
|
58 |
|
Lines 68-73
if ( $action eq 'lookup' ) {
Link Here
|
68 |
|
70 |
|
69 |
$template->param( |
71 |
$template->param( |
70 |
item => $item, |
72 |
item => $item, |
|
|
73 |
title => $title, |
71 |
course_item => $course_item, |
74 |
course_item => $course_item, |
72 |
course_reserve => $course_reserve, |
75 |
course_reserve => $course_reserve, |
73 |
|
76 |
|