Cleaned up contents of location information
[koha.git] / C4 / Stock.pm
1 package C4::Stock; #assumes C4/Stock.pm
2
3 use strict;
4 require Exporter;
5
6 use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
7 use C4::Database;
8
9 # set the version for version checking
10 $VERSION = 0.01;
11
12 @ISA = qw(Exporter);
13 @EXPORT = qw(&stockreport);
14
15 sub stockreport {
16   my $dbh=C4Connect;
17   my @results;
18   my $query="Select count(*) from items where homebranch='C'";
19   my $sth=$dbh->prepare($query);
20   $sth->execute;
21   my $count=$sth->fetchrow_hashref;
22   $results[0]="$count->{'count'}\t Levin";
23   $sth->finish;
24   $query="Select count(*) from items where homebranch='F'";
25   $sth=$dbh->prepare($query);
26   $sth->execute;
27   $count=$sth->fetchrow_hashref;
28   $results[1]="$count->{'count'}\t Foxton";
29   $sth->finish;
30   $dbh->disconnect;
31   return(@results);
32 }
33
34 END { }       # module clean-up code here (global destructor)
35   
36     
37