X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=members%2Fguarantor_search.pl;h=881df948301652095de58a8c01144eb6d60ca8db;hb=1f0c678d5c8711a3b6e8c867d91c1b47bea4711c;hp=e942ebbdd3bb9077f8cf8bf173adacef04ba1231;hpb=a3999812e691110f2e16fffd91ce0ed82d69178c;p=koha.git diff --git a/members/guarantor_search.pl b/members/guarantor_search.pl index e942ebbdd3..881df94830 100755 --- a/members/guarantor_search.pl +++ b/members/guarantor_search.pl @@ -1,6 +1,5 @@ #!/usr/bin/perl -# $Id$ # script to find a guarantor @@ -24,11 +23,8 @@ use strict; use C4::Auth; use C4::Output; -use C4::Interface::CGI::Output; use CGI; - -#op -use C4::Date; +use C4::Dates qw/format_date/; use C4::Members; my $input = new CGI; @@ -57,7 +53,6 @@ if ($member eq ''){ }else{ $template->param(results=>1); } -my $env; my ($count,$results); my @resultsdata; @@ -66,15 +61,15 @@ my $background = 0; if ($member ne ''){ if(length($member) == 1) { - ($count,$results)=GuarantornameSearch($env,$member,$orderby,"simple"); + ($count,$results)=SearchMember($member,$orderby,"simple",'A'); } else { - ($count,$results)=GuarantornameSearch($env,$member,$orderby,"advanced"); + ($count,$results)=SearchMember($member,$orderby,"advanced",'A'); } for (my $i=0; $i < $count; $i++){ #find out stats - my ($od,$issue,$fines)=borrdata2($env,$results->[$i]{'borrowerid'}); + my ($od,$issue,$fines)=GetMemberIssuesAndFines($results->[$i]{'borrowerid'}); my $guarantorinfo=uc($results->[$i]{'surname'})." , ".ucfirst($results->[$i]{'firstname'}); my %row = ( background => $background, @@ -84,8 +79,10 @@ if ($member ne ''){ surname => $results->[$i]{'surname'}, firstname => $results->[$i]{'firstname'}, categorycode => $results->[$i]{'categorycode'}, + streetnumber => $results->[$i]{'streetnumber'}, address => $results->[$i]{'address'}, city => $results->[$i]{'city'}, + zipcode => $results->[$i]{'zipcode'}, branchcode => $results->[$i]{'branchcode'}, guarantorinfo =>$guarantorinfo, #op @@ -105,4 +102,4 @@ $template->param( resultsloop => \@resultsdata ); -output_html_with_http_headers $input, $cookie, $template->output; \ No newline at end of file +output_html_with_http_headers $input, $cookie, $template->output;