[Koha-cvs] CVS: koha/C4 Biblio.pm,1.97,1.98

Paul POULAIN tipaul at users.sourceforge.net
Thu Jul 15 11:48:12 CEST 2004


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

Modified Files:
	Biblio.pm 
Log Message:
* removing useless sub
* minor bugfix in moditem (managing homebranch & holdingbranch)

Index: Biblio.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/Biblio.pm,v
retrieving revision 1.97
retrieving revision 1.98
diff -C2 -r1.97 -r1.98
*** Biblio.pm	2 Jul 2004 15:53:53 -0000	1.97
--- Biblio.pm	15 Jul 2004 09:48:10 -0000	1.98
***************
*** 1807,1812 ****
                               wthdrawn=?,
  			     itemcallnumber=?,
! 			     notforloan=?,
!                           where itemnumber=?";
          @bind = (
              $item->{'bibitemnum'},     $item->{'barcode'},
--- 1807,1811 ----
                               wthdrawn=?,
  			     itemcallnumber=?,
! 			     notforloan=?";
          @bind = (
              $item->{'bibitemnum'},     $item->{'barcode'},
***************
*** 1816,1819 ****
--- 1815,1827 ----
              $item->{'itemnum'}
          );
+ 		if ($item->{homebranch}) {
+ 			$query.=",homebranch=?";
+ 			push @bind, $item->{homebranch};
+ 		}
+ 		if ($item->{holdingbranch}) {
+ 			$query.=",holdingbranch=?";
+ 			push @bind, $item->{holdingbranch};
+ 		}
+ 		$query.=" where itemnumber=?";
      }
      if ( $item->{'replacement'} ne '' ) {
***************
*** 1960,2029 ****
  }
  
- =item getorder
- 
-   ($order, $ordernumber) = &getorder($biblioitemnumber, $biblionumber);
- 
- Looks up the order with the given biblionumber and biblioitemnumber.
- 
- Returns a two-element array. C<$ordernumber> is the order number.
- C<$order> is a reference-to-hash describing the order; its keys are
- fields from the biblio, biblioitems, aqorders, and aqorderbreakdown
- tables of the Koha database.
- 
- =cut
- 
- #'
- # FIXME - This is effectively identical to &C4::Catalogue::getorder.
- # Pick one and stick with it.
- sub getorder {
-     my ( $bi, $bib ) = @_;
-     my $dbh = C4::Context->dbh;
-     my $sth = $dbh->prepare( "Select ordernumber
-  	from aqorders
-  	where biblionumber=? and biblioitemnumber=?"
-     );
-     $sth->execute( $bib, $bi );
- 
-     # FIXME - Use fetchrow_array(), since we're only interested in the one
-     # value.
-     my $ordnum = $sth->fetchrow_hashref;
-     $sth->finish;
-     my $order = getsingleorder( $ordnum->{'ordernumber'} );
-     return ( $order, $ordnum->{'ordernumber'} );
- }
- 
- =item getsingleorder
- 
-   $order = &getsingleorder($ordernumber);
- 
- Looks up an order by order number.
- 
- Returns a reference-to-hash describing the order. The keys of
- C<$order> are fields from the biblio, biblioitems, aqorders, and
- aqorderbreakdown tables of the Koha database.
- 
- =cut
- 
- #'
- # FIXME - This is effectively identical to
- # &C4::Catalogue::getsingleorder.
- # Pick one and stick with it.
- sub getsingleorder {
-     my ($ordnum) = @_;
-     my $dbh = C4::Context->dbh;
-     my $sth =
-       $dbh->prepare(
-         "Select * from biblio,biblioitems,aqorders left join aqorderbreakdown
-   on aqorders.ordernumber=aqorderbreakdown.ordernumber
-   where aqorders.ordernumber=?
-   and biblio.biblionumber=aqorders.biblionumber
-   and biblioitems.biblioitemnumber=aqorders.biblioitemnumber"
-     );
-     $sth->execute($ordnum);
-     my $data = $sth->fetchrow_hashref;
-     $sth->finish;
-     return ($data);
- }
- 
  sub newbiblio {
      my ($biblio) = @_;
--- 1968,1971 ----
***************
*** 2590,2593 ****
--- 2532,2539 ----
  # $Id$
  # $Log$
+ # Revision 1.98  2004/07/15 09:48:10  tipaul
+ # * removing useless sub
+ # * minor bugfix in moditem (managing homebranch & holdingbranch)
+ #
  # Revision 1.97  2004/07/02 15:53:53  tipaul
  # bugfix (due to frameworkcode field)





More information about the Koha-cvs mailing list