[Koha-cvs] CVS: koha/C4 Acquisition.pm,1.13,1.14
Henri-Damien LAURENT
hdl at users.sourceforge.net
Tue Jul 12 15:59:41 CEST 2005
Update of /cvsroot/koha/koha/C4
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25642/C4
Modified Files:
Acquisition.pm
Log Message:
Modifying branch Selection : Now Superlibrarians are always able to see ALL branches budget, not simple librarians.
Index: Acquisition.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/Acquisition.pm,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -r1.13 -r1.14
*** Acquisition.pm 20 Jun 2005 14:10:00 -0000 1.13
--- Acquisition.pm 12 Jul 2005 13:59:39 -0000 1.14
***************
*** 666,674 ****
#'
sub bookfunds {
my $dbh = C4::Context->dbh;
! my $sth=$dbh->prepare("Select * from aqbookfund,aqbudget where aqbookfund.bookfundid
! =aqbudget.bookfundid
! group by aqbookfund.bookfundid order by bookfundname");
! $sth->execute;
my @results = ();
while (my $data=$sth->fetchrow_hashref){
--- 666,688 ----
#'
sub bookfunds {
+ my ($branch)=@_;
my $dbh = C4::Context->dbh;
! my $strsth;
!
! if ($branch eq '') {
! $strsth="Select * from aqbookfund,aqbudget where aqbookfund.bookfundid
! =aqbudget.bookfundid
! group by aqbookfund.bookfundid order by bookfundname";
! } else {
! $strsth="Select * from aqbookfund,aqbudget where aqbookfund.bookfundid
! =aqbudget.bookfundid and (aqbookfund.branchcode='' or aqbookfund.branchcode= ? )
! group by aqbookfund.bookfundid order by bookfundname";
! }
! my $sth=$dbh->prepare($strsth);
! if ($branch){
! $sth->execute($branch);
! } else {
! $sth->execute;
! }
my @results = ();
while (my $data=$sth->fetchrow_hashref){
More information about the Koha-cvs
mailing list