continuing bug fixes

This commit is contained in:
chris 2000-01-26 21:11:38 +00:00
parent 244d203dd6
commit 9453fe6086
6 changed files with 46 additions and 10 deletions

View file

@ -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";
}

View file

@ -268,7 +268,7 @@ sub endpage{
sub mklink {
my ($url,$text)=@_;
my $string="<a href=$url>$text</a>";
my $string="<a href=\"$url\">$text</a>";
return ($string);
}

View file

@ -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 {

View file

@ -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;

View file

@ -67,7 +67,7 @@ print <<printend
<TD><input type=text size=20 name=member></td>
<TD>$date</td>
<TD><select name=pickup>
<option value=L>Levin
<option value=C>Levin
<option value=F>Foxton
<option value=S>Shannon
<option value=T>Tokomaru
@ -173,8 +173,8 @@ print "</select>
<TD><a href=/cgi-bin/koha/member.pl?member=$bor>$reserves->[$i]{'firstname'} $reserves->[$i]{'surname'}</a></td>
<TD>$date</td>
<TD><select name=pickup>
<option value=L";
if ($reserves->[$i]{'branchcode'} eq 'L'){
<option value=C";
if ($reserves->[$i]{'branchcode'} eq 'C'){
print " selected";
}
print ">Levin

View file

@ -123,7 +123,7 @@ my $colour=1;
while ($i < $count2){
# print $results[$i]."\n";
my @stuff=split('\t',$results[$i]);
$stuff[1]=~ s/\`/\'/g;
$stuff[1]=~ s/\`/\\\'/g;
my $title2=$stuff[1];
$title2=~ s/ /%20/g;
if ($subject eq ''){
@ -138,7 +138,7 @@ while ($i < $count2){
$word=~ s/\n//g;
my $url="/cgi-bin/koha/search.pl?author=$word&type=$type";
$stuff[0]=mklink($url,$stuff[0]);
my ($count,$lcount,$nacount,$fcount,$scount,$lostcount)=itemcount($env,$stuff[2],$type);
my ($count,$lcount,$nacount,$fcount,$scount,$lostcount,$mending,$transit)=itemcount($env,$stuff[2],$type);
$stuff[4]=$count;
if ($nacount > 0){
$stuff[5]=$stuff[5]."On Loan";
@ -175,6 +175,21 @@ while ($i < $count2){
}
$stuff[5].=" ";
}
if ($mending > 0){
$stuff[5]=$stuff[5]."Mending";
if ($mending >1 ){
$stuff[5]=$stuff[5]." ($mending)";
}
$stuff[5].=" ";
}
if ($transit > 0){
$stuff[5]=$stuff[5]."In Transiit";
if ($transit >1 ){
$stuff[5]=$stuff[5]." ($transit)";
}
$stuff[5].=" ";
}
if ($type ne 'opac'){
$stuff[6]=mklink("/cgi-bin/koha/request.pl?bib=$stuff[2]","Request");
}