diff --git a/C4/Circulation/Fines.pm b/C4/Circulation/Fines.pm index 16ea1a7..d140a7e 100644 --- a/C4/Circulation/Fines.pm +++ b/C4/Circulation/Fines.pm @@ -93,7 +93,7 @@ sub CalcFine { $amount=$data->{'fine'}*2; $printout="Second Notice"; } - if ($difference == $data->{'accountsent'}){ + if ($difference == $data->{'accountsent'} && $data->{'fine'} > 0){ $amount=5; $printout="Final Notice"; } diff --git a/C4/Output.pm b/C4/Output.pm index 9c225dd..dbe38bd 100644 --- a/C4/Output.pm +++ b/C4/Output.pm @@ -268,7 +268,7 @@ sub endpage{ sub mklink { my ($url,$text)=@_; - my $string="$text"; + my $string="$text"; return ($string); } diff --git a/C4/Search.pm b/C4/Search.pm index 1cf84df..301bc26 100755 --- a/C4/Search.pm +++ b/C4/Search.pm @@ -850,6 +850,8 @@ sub itemcount { my $fcount=0; my $scount=0; my $lostcount=0; + my $mending=0; + my $transit=0; while (my $data=$sth->fetchrow_hashref){ $count++; my $query2="select * from issues,items where issues.itemnumber= @@ -872,13 +874,18 @@ sub itemcount { if ($data->{'itemlost'} eq '1'){ $lostcount++; } - + if ($data->{'holdingbranch'} eq 'FM'){ + $mending++; + } + if ($data->{'holdingbranch'} eq 'TR'){ + $transit++; + } } $sth2->finish; } $sth->finish; $dbh->disconnect; - return ($count,$lcount,$nacount,$fcount,$scount,$lostcount); + return ($count,$lcount,$nacount,$fcount,$scount,$lostcount,$mending,$transit); } sub ItemType { diff --git a/opac-search.pl b/opac-search.pl index e5b1ecb..c6df059 100755 --- a/opac-search.pl +++ b/opac-search.pl @@ -67,7 +67,7 @@ while ($i < $count2){ $word=~ s/\n//g; my $url="/cgi-bin/koha/search.pl?author=$word&type=opac"; $stuff[0]=mklink($url,$stuff[0]); - my ($count,$lcount,$nacount,$fcount,$scount)=itemcount($env,$stuff[2]); + my ($count,$lcount,$nacount,$fcount,$scount,$lostcount,$mending,$transit)=itemcount($env,$stuff[2]); $stuff[3]=$count; if ($nacount > 0){ $stuff[4]=$stuff[4]."On Loan"; @@ -97,6 +97,20 @@ while ($i < $count2){ } $stuff[4].=" "; } + if ($mending > 0){ + $stuff[4]=$stuff[4]."Mending"; + if ($mending >1 ){ + $stuff[4]=$stuff[4]." ($mending)"; + } + $stuff[4].=" "; + } + if ($transit > 0){ + $stuff[4]=$stuff[4]."In Transit"; + if ($transit >1 ){ + $stuff[4]=$stuff[4]." ($transit)"; + } + $stuff[4].=" "; + } if ($colour == 1){ print mktablerow(4,'#efe5ef',$stuff[1],$stuff[0],$stuff[3],$stuff[4]); $colour=0; diff --git a/request.pl b/request.pl index 638287d..f90d5ae 100755 --- a/request.pl +++ b/request.pl @@ -67,7 +67,7 @@ print < $date $reserves->[$i]{'firstname'} $reserves->[$i]{'surname'} $date