Displaying Sort Authorised values if linked to authorisedvalue list.
[koha_fer] / C4 / Members.pm
index 6accd17..96b47fe 100644 (file)
@@ -547,7 +547,7 @@ sub GetMemberIssuesAndFines {
       "Select count(*) from issues where borrowernumber='$borrowernumber' and
     returndate is NULL";
 
-    $debug and print $query, "\n";
+    $debug and warn $query."\n";
     my $sth = $dbh->prepare($query);
     $sth->execute;
     my $data = $sth->fetchrow_hashref;
@@ -1533,7 +1533,8 @@ sub GetSortDetails {
     my $sth = $dbh->prepare($query);
     $sth->execute( $category, $sortvalue );
     my $lib = $sth->fetchrow;
-    return ($lib);
+    return ($lib) if ($lib);
+    return ($sortvalue) unless ($lib);
 }
 
 =head2 DeleteBorrower