Lines 31-42
use C4::CourseReserves qw(GetCourse GetCourseItem GetCourseReserve ModCourseItem
Link Here
|
31 |
|
31 |
|
32 |
my $cgi = new CGI; |
32 |
my $cgi = new CGI; |
33 |
|
33 |
|
34 |
my $action = $cgi->param('action') || ''; |
34 |
my $action = $cgi->param('action') || ''; |
35 |
my $course_id = $cgi->param('course_id') || ''; |
35 |
my $course_id = $cgi->param('course_id') || ''; |
36 |
my $barcode = $cgi->param('barcode') || ''; |
36 |
my $barcode = $cgi->param('barcode') || ''; |
37 |
my $return = $cgi->param('return') || ''; |
37 |
my $return = $cgi->param('return') || ''; |
|
|
38 |
my $itemnumber = ($cgi->param('itemnumber') && $action eq 'lookup') ? $cgi->param('itemnumber') : ''; |
38 |
|
39 |
|
39 |
my $item = GetBiblioFromItemNumber( undef, $barcode ); |
40 |
my $item = GetBiblioFromItemNumber( $itemnumber, $barcode ); |
40 |
|
41 |
|
41 |
my $step = ( $action eq 'lookup' && $item ) ? '2' : '1'; |
42 |
my $step = ( $action eq 'lookup' && $item ) ? '2' : '1'; |
42 |
|
43 |
|
Lines 49-56
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
Link Here
|
49 |
flagsrequired => { coursereserves => 'add_reserves' }, |
50 |
flagsrequired => { coursereserves => 'add_reserves' }, |
50 |
} |
51 |
} |
51 |
); |
52 |
); |
52 |
$template->param( ERROR_BARCODE_NOT_FOUND => $barcode ) |
53 |
my $inumber = $itemnumber ? "<blank> (itemnumber:$itemnumber)" : ""; |
53 |
unless ( $barcode && $item && $action eq 'lookup' ); |
54 |
$template->param( ERROR_BARCODE_NOT_FOUND => $barcode . $inumber ) |
|
|
55 |
unless ( $barcode && !$itemnumber && $item && $action eq 'lookup' ); |
54 |
|
56 |
|
55 |
$template->param( course => GetCourse($course_id) ); |
57 |
$template->param( course => GetCourse($course_id) ); |
56 |
|
58 |
|