Bug 4041: DBRev 3.19.00.032
[koha.git] / opac / opac-user.pl
index aae78ec..18dfec6 100755 (executable)
@@ -3,24 +3,24 @@
 # This file is part of Koha.
 # parts copyright 2010 BibLibre
 #
-# Koha is free software; you can redistribute it and/or modify it under the
-# terms of the GNU General Public License as published by the Free Software
-# Foundation; either version 2 of the License, or (at your option) any later
-# version.
+# Koha is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
 #
-# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
-# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
-# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+# Koha is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
 #
-# You should have received a copy of the GNU General Public License along
-# with Koha; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+# You should have received a copy of the GNU General Public License
+# along with Koha; if not, see <http://www.gnu.org/licenses>.
 
 
 use strict;
 #use warnings; FIXME - Bug 2505
 
-use CGI;
+use CGI qw ( -utf8 );
 
 use C4::Auth;
 use C4::Koha;
@@ -35,6 +35,7 @@ use C4::Items;
 use C4::Letters;
 use C4::Branch; # GetBranches
 use Koha::DateUtils;
+use Koha::Borrower::Debarments qw(IsDebarred);
 
 use constant ATTRIBUTE_SHOW_BARCODE => 'SHOW_BCODE';
 
@@ -84,7 +85,7 @@ my ($warning_year, $warning_month, $warning_day) = split /-/, $borr->{'dateexpir
 
 $borr->{'ethnicity'} = fixEthnicity( $borr->{'ethnicity'} );
 
-my $debar = $borr->{'debarred'};
+my $debar = IsDebarred($borrowernumber);
 my $userdebarred;
 
 if ($debar) {
@@ -310,6 +311,7 @@ foreach my $res (@reserves) {
         $res->{'holdingbranch'} =
           $branches->{ $item->{'holdingbranch'} }->{'branchname'};
         $res->{'branch'} = $branches->{ $res->{'branchcode'} }->{'branchname'};
+        $res->{'enumchron'} = $item->{'enumchron'} if $item->{'enumchron'};
         # get document reserve status
         my $biblioData = GetBiblioData($res->{'biblionumber'});
         $res->{'waiting_title'} = $biblioData->{'title'};