[Koha-cvs] CVS: koha/C4 Acquisition.pm,1.16,1.17

Henri-Damien LAURENT hdl at users.sourceforge.net
Thu Jul 28 17:40:54 CEST 2005


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

Modified Files:
	Acquisition.pm 
Log Message:
Some Bug Fixes

Index: Acquisition.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/Acquisition.pm,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -r1.16 -r1.17
*** Acquisition.pm	28 Jul 2005 07:52:03 -0000	1.16
--- Acquisition.pm	28 Jul 2005 15:40:52 -0000	1.17
***************
*** 394,398 ****
  	
  	my $strsth ="Select count(*),authorisedby,creationdate,aqbasket.basketno,
! closedate,surname,firstname 
  from aqorders 
  left join aqbasket on aqbasket.basketno=aqorders.basketno 
--- 394,398 ----
  	
  	my $strsth ="Select count(*),authorisedby,creationdate,aqbasket.basketno,
! closedate,surname,firstname,aqorders.title 
  from aqorders 
  left join aqbasket on aqbasket.basketno=aqorders.basketno 
***************
*** 408,412 ****
  	}
  	$strsth.=" group by basketno order by aqbasket.basketno";
- 	warn "getorders :".$strsth;
  	my $sth=$dbh->prepare($strsth);
  	$sth->execute($supplierid);
--- 408,411 ----
***************
*** 491,495 ****
    my $dbh = C4::Context->dbh;
    my @results = ();
!   my $strsth="Select * from aqorders,biblio,biblioitems,aqbasket "; 
  	$strsth .= ",borrowers " if (C4::Context->preference("IndependantBranches")); 
  	$strsth .=" where aqorders.basketno=aqbasket.basketno and aqbasket.booksellerid=aqbooksellers.id and biblio.biblionumber=aqorders.biblionumber ";
--- 490,494 ----
    my $dbh = C4::Context->dbh;
    my @results = ();
!   my $strsth="Select *,aqorders.title as suggestedtitle,biblio.title as truetitle from aqorders,biblio,biblioitems,aqbasket,aqbooksellers "; 
  	$strsth .= ",borrowers " if (C4::Context->preference("IndependantBranches")); 
  	$strsth .=" where aqorders.basketno=aqbasket.basketno and aqbasket.booksellerid=aqbooksellers.id and biblio.biblionumber=aqorders.biblionumber ";
***************
*** 498,502 ****
    and (quantityreceived < quantity or quantityreceived is NULL)
    and biblio.biblionumber=aqorders.biblionumber and biblioitems.biblioitemnumber=
!   aqorders.biblioitemnumber";
  	if (C4::Context->preference("IndependantBranches")) {
  		my $userenv = C4::Context->userenv;
--- 497,501 ----
    and (quantityreceived < quantity or quantityreceived is NULL)
    and biblio.biblionumber=aqorders.biblionumber and biblioitems.biblioitemnumber=
!   aqorders.biblioitemnumber ";
  	if (C4::Context->preference("IndependantBranches")) {
  		my $userenv = C4::Context->userenv;
***************
*** 505,511 ****
  		}
  	}
! 	$strsth .= "group by aqorders.biblioitemnumber
!   order by
!   biblio.title";
    my $sth=$dbh->prepare($strsth);
    $sth->execute($supid);
--- 504,508 ----
  		}
  	}
! 	$strsth .= " group by aqorders.biblioitemnumber order by biblio.title";
    my $sth=$dbh->prepare($strsth);
    $sth->execute($supid);
***************
*** 582,586 ****
  	map { push(@searchterms,"$_%","% $_%") } @data;
  	push(@searchterms,$search,$search,$biblio);
! 	my $sth=$dbh->prepare("Select biblio.*,biblioitems.*,aqorders.*,aqbasket.*,biblio.title from aqorders,biblioitems,biblio,aqbasket
  		where aqorders.biblioitemnumber = biblioitems.biblioitemnumber and
  		aqorders.basketno = aqbasket.basketno
--- 579,583 ----
  	map { push(@searchterms,"$_%","% $_%") } @data;
  	push(@searchterms,$search,$search,$biblio);
! 	my $sth=$dbh->prepare("Select biblio.*,biblioitems.*,aqorders.*,aqbasket.* from aqorders,biblioitems,biblio,aqbasket
  		where aqorders.biblioitemnumber = biblioitems.biblioitemnumber and
  		aqorders.basketno = aqbasket.basketno





More information about the Koha-cvs mailing list