koha-cvs
[Top][All Lists]
Advanced

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

[Koha-cvs] CVS: koha/C4 Acquisition.pm,1.9.2.2,1.9.2.3


From: Henri-Damien LAURENT
Subject: [Koha-cvs] CVS: koha/C4 Acquisition.pm,1.9.2.2,1.9.2.3
Date: Thu, 26 May 2005 02:21:32 -0700

Update of /cvsroot/koha/koha/C4
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31755/C4

Modified Files:
      Tag: rel_2_2
        Acquisition.pm 
Log Message:
Adding filter on placed on dates.
Modifying histsearch in C4/Acquisition.pm to take placedon_dates into account
And Acquistion-top to enable calendars

Index: Acquisition.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/Acquisition.pm,v
retrieving revision 1.9.2.2
retrieving revision 1.9.2.3
diff -C2 -r1.9.2.2 -r1.9.2.3
*** Acquisition.pm      25 Mar 2005 16:19:03 -0000      1.9.2.2
--- Acquisition.pm      26 May 2005 09:21:29 -0000      1.9.2.3
***************
*** 598,610 ****
  
  sub histsearch {
!       my ($title,$author,$name)address@hidden;
        my $dbh= C4::Context->dbh;
!       my $query = "select 
biblio.title,aqorders.basketno,name,aqbasket.creationdate,aqorders.datereceived,
 aqorders.quantity, aqorders.ecost
!                                                       from 
aqorders,aqbasket,aqbooksellers,biblio 
!                                                       where 
aqorders.basketno=aqbasket.basketno and aqbasket.booksellerid=aqbooksellers.id 
and
!                                                       
biblio.biblionumber=aqorders.biblionumber";
        $query .= " and biblio.title like ".$dbh->quote("%".$title."%") if 
$title;
        $query .= " and biblio.author like ".$dbh->quote("%".$author."%") if 
$author;
        $query .= " and name like ".$dbh->quote("%".$name."%") if $name;
        my $sth = $dbh->prepare($query);
        $sth->execute;
--- 598,612 ----
  
  sub histsearch {
!       my ($title,$author,$name,$from_placed_on,$to_placed_on)address@hidden;
        my $dbh= C4::Context->dbh;
!       my $query = "select 
biblio.title,aqorders.basketno,name,aqbasket.creationdate,aqorders.datereceived,
 aqorders.quantity, aqorders.ecost from aqorders,aqbasket,aqbooksellers,biblio 
! where aqorders.basketno=aqbasket.basketno and 
aqbasket.booksellerid=aqbooksellers.id and
! biblio.biblionumber=aqorders.biblionumber";
        $query .= " and biblio.title like ".$dbh->quote("%".$title."%") if 
$title;
        $query .= " and biblio.author like ".$dbh->quote("%".$author."%") if 
$author;
        $query .= " and name like ".$dbh->quote("%".$name."%") if $name;
+       $query .= " and creationdate >" .$dbh->quote($from_placed_on) if 
$from_placed_on;
+       $query .= " and creationdate<".$dbh->quote($to_placed_on) if 
$to_placed_on;
+       warn "C4:Acquisition : ".$query;
        my $sth = $dbh->prepare($query);
        $sth->execute;




reply via email to

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