my $op = $input->param('op') || 'delete_confirm';
my $dbh = C4::Context->dbh;
-my $is_guarantor = $dbh->selectrow_array("SELECT COUNT(*) FROM borrowers WHERE guarantorid=?", undef, $member);
+my $is_guarantor = $patron->guarantee_relationships->count;
my $countholds = $dbh->selectrow_array("SELECT COUNT(*) FROM reserves WHERE borrowernumber=?", undef, $member);
if ( $op eq 'delete_confirm' or $countissues > 0 or $charges or $is_guarantor ) {
if ( $charges > 0 ) {
$template->param(charges => $charges);
}
- if ($is_guarantor) {
- $template->param(guarantees => 1);
+ if ( $is_guarantor ) {
+ $template->param( guarantees => 1 );
}
if($countholds > 0){
$template->param(ItemsOnHold => $countholds);