Lines 39-60
my $biblionumber = $input->param('biblionumber');
Link Here
|
39 |
my $biblio = Koha::Biblios->find( $biblionumber ); |
39 |
my $biblio = Koha::Biblios->find( $biblionumber ); |
40 |
my $item = Koha::Items->find( $itm ); |
40 |
my $item = Koha::Items->find( $itm ); |
41 |
|
41 |
|
42 |
if ( !defined $biblio or !defined $item ) { |
|
|
43 |
print $input->redirect("/cgi-bin/koha/errors/400.pl"); |
44 |
} |
45 |
|
46 |
my $lastmove = lastmove($itm); |
47 |
|
48 |
my $lastdate; |
49 |
my $count; |
50 |
if ( not $lastmove ) { |
51 |
$count = issuessince( $itm, 0 ); |
52 |
} else { |
53 |
$lastdate = $lastmove->{'datearrived'}; |
54 |
$count = issuessince( $itm, $lastdate ); |
55 |
} |
56 |
|
57 |
# make the page ... |
58 |
|
42 |
|
59 |
my ( $template, $loggedinuser, $cookie ) = get_template_and_user( |
43 |
my ( $template, $loggedinuser, $cookie ) = get_template_and_user( |
60 |
{ |
44 |
{ |
Lines 67-72
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
Link Here
|
67 |
} |
51 |
} |
68 |
); |
52 |
); |
69 |
|
53 |
|
|
|
54 |
output_and_exit( $input, $cookie, $template, 'unknown_biblio') |
55 |
unless $biblio; |
56 |
output_and_exit( $input, $cookie, $template, 'unknown_item') |
57 |
unless $item; |
58 |
|
59 |
my $lastdate; |
60 |
my $count; |
61 |
my $lastmove = lastmove($itm); |
62 |
if ( not $lastmove ) { |
63 |
$count = issuessince( $itm, 0 ); |
64 |
} else { |
65 |
$lastdate = $lastmove->{'datearrived'}; |
66 |
$count = issuessince( $itm, $lastdate ); |
67 |
} |
68 |
|
70 |
my $libraries = Koha::Libraries->search({}, { order_by => ['branchname'] })->unblessed; |
69 |
my $libraries = Koha::Libraries->search({}, { order_by => ['branchname'] })->unblessed; |
71 |
for my $library ( @$libraries ) { |
70 |
for my $library ( @$libraries ) { |
72 |
$library->{selected} = 1 if $library->{branchcode} eq C4::Context->userenv->{branch}; |
71 |
$library->{selected} = 1 if $library->{branchcode} eq C4::Context->userenv->{branch}; |