#!/usr/bin/perl
-#writen 2/1/00 by chris@katipo.oc.nz
+#written 2/1/00 by chris@katipo.oc.nz
# Copyright 2000-2002 Katipo Communications
# Parts Copyright 2011 Catalyst IT
#
use C4::Members;
use C4::Search; # enabled_staff_search_views
use Koha::DateUtils;
-use Koha::Borrower::Debarments qw(IsDebarred);
+use Koha::Patron::Debarments qw(IsDebarred);
use Koha::Holds;
+use Koha::Libraries;
my $dbh = C4::Context->dbh;
-my $sth;
my $input = new CGI;
my ( $template, $borrowernumber, $cookie, $flags ) = get_template_and_user(
{
if ($borrowernumber_hold && !$action) {
my $borrowerinfo = GetMember( borrowernumber => $borrowernumber_hold );
my $diffbranch;
- my @getreservloop;
# we check the reserves of the borrower, and if he can reserv a document
# FIXME At this time we have a simple count of reservs, but, later, we could improve the infos "title" ...
# adding a fixed value for priority options
my $fixedRank = $count+1;
- my @branchcodes;
my %itemnumbers_of_biblioitem;
my @itemnumbers;
}
if ( $res->is_found() ) {
- $reserve{'wait'} = 1;
$reserve{'holdingbranch'} = $res->item()->holdingbranch();
$reserve{'biblionumber'} = $res->item()->biblionumber();
$reserve{'barcodenumber'} = $res->item()->barcode();
$reserve{'firstname'} = $res->borrower()->firstname();
$reserve{'surname'} = $res->borrower()->surname();
$reserve{'notes'} = $res->reservenotes();
- $reserve{'wait'} = $res->is_waiting();
$reserve{'waiting_date'} = $res->waitingdate();
$reserve{'waiting_until'} = $res->is_waiting() ? $res->waiting_expires_on() : undef;
$reserve{'ccode'} = $res->item() ? $res->item()->ccode() : undef;
$reserve{'reserve_id'} = $res->reserve_id();
if ( C4::Context->preference('IndependentBranches') && $flags->{'superlibrarian'} != 1 ) {
- $reserve{'branchloop'} = [ GetBranchDetail( $res->branchcode() ) ];
+ $reserve{'branchloop'} = [ Koha::Libraries->find( $res->branchcode() ) ];
}
else {
$reserve{'branchloop'} = GetBranchesLoop( $res->branchcode() );