Bug 16735: Filter individual libraries from search group pulldown
[koha.git] / members / deletemem.pl
index 5ea015a..b68cb54 100755 (executable)
@@ -21,8 +21,7 @@
 # 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 Modern::Perl;
 
 use CGI qw ( -utf8 );
 use C4::Context;
@@ -75,6 +74,10 @@ my $issues = GetPendingIssues($member);     # FIXME: wasteful call when really,
 my $countissues = scalar(@$issues);
 
 my $patron = Koha::Patrons->find( $member );
+unless ( $patron ) {
+    print $input->redirect("/cgi-bin/koha/circ/circulation.pl?borrowernumber=$member");
+    exit;
+}
 my $flags = C4::Members::patronflags( $patron->unblessed );
 my $userenv = C4::Context->userenv;
 
@@ -128,7 +131,6 @@ if ( $op eq 'delete_confirm' or $countissues > 0 or $flags->{'CHARGES'}  or $is_
         phone => $patron->phone,
         email => $patron->email,
         branchcode => $patron->branchcode,
-        RoutingSerials => C4::Context->preference('RoutingSerials'),
     );
     if ($countissues >0) {
         $template->param(ItemsOnIssues => $countissues);