Merge branch 'bug_9052' into 3.12-master
[koha.git] / members / deletemem.pl
index b1ba709..a813cd6 100755 (executable)
@@ -30,6 +30,7 @@ use C4::Output;
 use C4::Auth;
 use C4::Members;
 use C4::Branch; # GetBranches
+use C4::VirtualShelves (); #no import
 
 my $input = new CGI;
 
@@ -102,6 +103,7 @@ if ($countissues > 0 or $flags->{'CHARGES'}  or $data->{'borrowernumber'}){
         email => $bor->{'email'},
         branchcode => $bor->{'branchcode'},
         branchname => GetBranchName($bor->{'branchcode'}),
+               activeBorrowerRelationship => (C4::Context->preference('borrowerRelationship') ne ''),
     );
     if ($countissues >0) {
         $template->param(ItemsOnIssues => $countissues);
@@ -116,6 +118,7 @@ output_html_with_http_headers $input, $cookie, $template->output;
 
 } else {
     MoveMemberToDeleted($member);
+    C4::VirtualShelves::HandleDelBorrower($member);
     DelMember($member);
     print $input->redirect("/cgi-bin/koha/members/members-home.pl");
 }