orderreceive cleanup
[koha.git] / serials / distributedto.pl
index d266ac8..af4088b 100755 (executable)
@@ -17,7 +17,6 @@
 # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
 # Suite 330, Boston, MA  02111-1307 USA
 
-# $Id$
 
 =head1 NAME
 
@@ -49,13 +48,11 @@ to know what subscription this scrpit have to distribute.
 
 use strict;
 use CGI;
-use C4::Date;
+use C4::Dates;
 use C4::Auth;
 use C4::Context;
 use C4::Output;
-use C4::Interface::CGI::Output;
-use C4::Search;
-use HTML::Template;
+
 use C4::Serials;
 use C4::Members;
 
@@ -77,11 +74,11 @@ my ($template, $borrowernumber, $cookie)
                  query => $input,
                  type => "intranet",
                  authnotrequired => 0,
-                 flagsrequired => {cataloguing => 1},
+                 flagsrequired => {serials => 1},
                  debug => 1,
                  });
 
-my ($count,$results)=GetBorrowersFromSurname($searchfield) if $searchfield;
+my ($count,$results)=SearchMember($searchfield,"firstname","simple",) if $searchfield;
 my $toggle="0";
 my @loop_data =();
 for (my $i=0; $i < $count; $i++){