View | Details | Raw Unified | Return to bug 19935
Collapse All | Expand All

(-)a/members/deletemem.pl (-6 / +1 lines)
Lines 71-89 if ( C4::Context->preference('NorwegianPatronDBEnable') && C4::Context->preferen Link Here
71
    }
71
    }
72
}
72
}
73
73
74
my $issues = GetPendingIssues($member);     # FIXME: wasteful call when really, we only want the count
75
my $countissues = scalar(@$issues);
76
77
my $patron = Koha::Patrons->find( $member );
74
my $patron = Koha::Patrons->find( $member );
78
unless ( $patron ) {
75
unless ( $patron ) {
79
    print $input->redirect("/cgi-bin/koha/circ/circulation.pl?borrowernumber=$member");
76
    print $input->redirect("/cgi-bin/koha/circ/circulation.pl?borrowernumber=$member");
80
    exit;
77
    exit;
81
}
78
}
79
my $countissues = $patron->pending_checkouts->count;
82
my $charges = $patron->account->non_issues_charges;
80
my $charges = $patron->account->non_issues_charges;
83
my $userenv = C4::Context->userenv;
81
my $userenv = C4::Context->userenv;
84
82
85
 
86
87
if ($patron->category->category_type eq "S") {
83
if ($patron->category->category_type eq "S") {
88
    unless(C4::Auth::haspermission($userenv->{'id'},{'staffaccess'=>1})) {
84
    unless(C4::Auth::haspermission($userenv->{'id'},{'staffaccess'=>1})) {
89
        print $input->redirect("/cgi-bin/koha/members/moremember.pl?borrowernumber=$member&error=CANT_DELETE_STAFF");
85
        print $input->redirect("/cgi-bin/koha/members/moremember.pl?borrowernumber=$member&error=CANT_DELETE_STAFF");
90
- 

Return to bug 19935