koha-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Koha-cvs] CVS: koha/C4 Search.pm,1.18.2.3,1.18.2.4


From: Steve Tonnesen
Subject: [Koha-cvs] CVS: koha/C4 Search.pm,1.18.2.3,1.18.2.4
Date: Wed, 26 Jun 2002 11:18:26 -0700

Update of /cvsroot/koha/koha/C4
In directory usw-pr-cvs1:/tmp/cvs-serv5155/C4

Modified Files:
      Tag: rel-1-2
        Search.pm 
Log Message:
Fixed bug where location wouldn't show up in search results.  Should still
be compatible with HLT configuration.


Index: Search.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/Search.pm,v
retrieving revision 1.18.2.3
retrieving revision 1.18.2.4
diff -C2 -r1.18.2.3 -r1.18.2.4
*** Search.pm   28 May 2002 20:39:40 -0000      1.18.2.3
--- Search.pm   26 Jun 2002 18:18:23 -0000      1.18.2.4
***************
*** 19,23 ****
  &getboracctrecord &ItemType &itemissues &subject &subtitle
  &addauthor &bibitems &barcodes &findguarantees &allissues &systemprefs
! &findguarantor); 
  
  sub findguarantees{         
--- 19,23 ----
  &getboracctrecord &ItemType &itemissues &subject &subtitle
  &addauthor &bibitems &barcodes &findguarantees &allissues &systemprefs
! &findguarantor &branchname); 
  
  sub findguarantees{         
***************
*** 1167,1171 ****
    my $transit=0;
    my $ocount=0;
!   while (my $data=$sth->fetchrow_hashref){
      $count++;                     
      my $query2="select * from issues,items where issues.itemnumber=           
               
--- 1167,1172 ----
    my $transit=0;
    my $ocount=0;
!   my $branchcount;
!   while (my $data=$sth->fetchrow_hashref) {
      $count++;                     
      my $query2="select * from issues,items where issues.itemnumber=           
               
***************
*** 1196,1203 ****
          $transit++;
        }
      }                             
      $sth2->finish;     
    } 
- #  if ($count == 0){
      my $query2="Select * from aqorders where biblionumber=$bibnum";
      my $sth2=$dbh->prepare($query2);
--- 1197,1206 ----
          $transit++;
        }
+       unless ($data->{'itemlost'} || $data->{'holdingbranch'} eq 'FM' || 
$data->{'holdingbranch'} eq 'TR') {
+         $branchcount->{$data->{'holdingbranch'}}++;
+       }
      }                             
      $sth2->finish;     
    } 
      my $query2="Select * from aqorders where biblionumber=$bibnum";
      my $sth2=$dbh->prepare($query2);
***************
*** 1206,1214 ****
        $ocount=$data->{'quantity'} - $data->{'quantityreceived'};
      }
- #    $count+=$ocount;
      $sth2->finish;
    $sth->finish; 
    $dbh->disconnect;                   
!   return 
($count,$lcount,$nacount,$fcount,$scount,$lostcount,$mending,$transit,$ocount); 
  }
  
--- 1209,1216 ----
        $ocount=$data->{'quantity'} - $data->{'quantityreceived'};
      }
      $sth2->finish;
    $sth->finish; 
    $dbh->disconnect;                   
!   return 
($count,$lcount,$nacount,$fcount,$scount,$lostcount,$mending,$transit,$ocount, 
$branchcount); 
  }
  
***************
*** 1261,1266 ****
    $dbh->disconnect;
    return(@barcodes);
-   
  }
  END { }       # module clean-up code here (global destructor)
  
--- 1263,1281 ----
    $dbh->disconnect;
    return(@barcodes);
  }
+ 
+ sub branchname {
+   my ($branchcode)address@hidden;
+   my $dbh=C4Connect;
+   my $query="Select branchname from branches where
+   branchcode=?";
+   my $sth=$dbh->prepare($query);
+   $sth->execute($branchcode);
+   my ($branchname) = $sth->fetchrow;
+   $sth->finish;
+   $dbh->disconnect;
+   return($branchname);
+ }
+ 
  END { }       # module clean-up code here (global destructor)
  




reply via email to

[Prev in Thread] Current Thread [Next in Thread]