koha-cvs
[Top][All Lists]
Advanced

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

[Koha-cvs] CVS: koha/C4 Acquisitions.pm,1.28,1.29


From: Andrew Arensburger
Subject: [Koha-cvs] CVS: koha/C4 Acquisitions.pm,1.28,1.29
Date: Sun, 13 Oct 2002 01:27:51 -0700

Update of /cvsroot/koha/koha/C4
In directory usw-pr-cvs1:/tmp/cvs-serv14436

Modified Files:
        Acquisitions.pm 
Log Message:
Deleted unused variables.
Removed trailing whitespace.


Index: Acquisitions.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/Acquisitions.pm,v
retrieving revision 1.28
retrieving revision 1.29
diff -C2 -r1.28 -r1.29
*** Acquisitions.pm     13 Oct 2002 05:52:46 -0000      1.28
--- Acquisitions.pm     13 Oct 2002 08:27:49 -0000      1.29
***************
*** 28,32 ****
  use C4::Context;
   #use C4::Biblio;
! use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
  
  # set the version for version checking
--- 28,32 ----
  use C4::Context;
   #use C4::Biblio;
! use vars qw($VERSION @ISA @EXPORT);
  
  # set the version for version checking
***************
*** 59,63 ****
  &newordernum &modbiblio &modorder &getsingleorder &invoice &receiveorder
  &bookfundbreakdown &curconvert &updatesup &insertsup &newitems &modbibitem
! &getcurrencies &modsubtitle &modsubject &modaddauthor &moditem &countitems 
  &findall &needsmod &delitem &deletebiblioitem &delbiblio &delorder &branches
  &getallorders &getrecorders &updatecurrencies &getorder &getcurrency 
&updaterecorder
--- 59,63 ----
  &newordernum &modbiblio &modorder &getsingleorder &invoice &receiveorder
  &bookfundbreakdown &curconvert &updatesup &insertsup &newitems &modbibitem
! &getcurrencies &modsubtitle &modsubject &modaddauthor &moditem &countitems
  &findall &needsmod &delitem &deletebiblioitem &delbiblio &delorder &branches
  &getallorders &getrecorders &updatecurrencies &getorder &getcurrency 
&updaterecorder
***************
*** 66,108 ****
  &getbiblioitem &getitemsbybiblioitem &isbnsearch
  &websitesearch &addwebsite &updatewebsite &deletewebsite);
- %EXPORT_TAGS = ( );     # eg: TAG => [ qw!name1 name2! ],
- 
- # your exported package globals go here,
- # as well as any optionally exported functions
- 
- @EXPORT_OK   = qw($Var1 %Hashit);     # FIXME - Never used
- 
- 
- # non-exported package globals go here
- use vars qw(@more $stuff);            # FIXME - Never used
- 
- # initalize package globals, first exported ones
- # FIXME - Never used
- my $Var1   = '';
- my %Hashit = ();
- 
- 
- 
- # then the others (which are still accessible as $Some::Module::stuff)
- # FIXME - Never used
- my $stuff  = '';
- my @more   = ();
- 
- # all file-scoped lexicals must be created before
- # the functions below that use them.
- 
- # file-private lexicals go here
- # FIXME - Never used
- my $priv_var    = '';
- my %secret_hash = ();
- 
- # FIXME - Never used
- # here's a file-private function as a closure,
- # callable as &$priv_func;  it cannot be prototyped.
- my $priv_func = sub {
-   # stuff goes here.
-   };
-   
- # make all your functions, whether exported or not;
  
  =item getorders
--- 66,69 ----
***************
*** 143,147 ****
    my ($supplierid)address@hidden;
    my $dbh = C4::Context->dbh;
!   my $query = "Select count(*),authorisedby,entrydate,basketno from aqorders 
where 
    booksellerid='$supplierid' and (quantity > quantityreceived or
    quantityreceived is NULL)
--- 104,108 ----
    my ($supplierid)address@hidden;
    my $dbh = C4::Context->dbh;
!   my $query = "Select count(*),authorisedby,entrydate,basketno from aqorders 
where
    booksellerid='$supplierid' and (quantity > quantityreceived or
    quantityreceived is NULL)
***************
*** 195,200 ****
    my ($bi,$bib)address@hidden;
    my $dbh = C4::Context->dbh;
!   my $query="Select ordernumber 
!       from aqorders 
        where biblionumber=? and biblioitemnumber=?";
    my $sth=$dbh->prepare($query);
--- 156,161 ----
    my ($bi,$bib)address@hidden;
    my $dbh = C4::Context->dbh;
!   my $query="Select ordernumber
!       from aqorders
        where biblionumber=? and biblioitemnumber=?";
    my $sth=$dbh->prepare($query);
***************
*** 224,229 ****
    my ($ordnum)address@hidden;
    my $dbh = C4::Context->dbh;
!   my $query="Select * from biblio,biblioitems,aqorders,aqorderbreakdown 
!   where aqorders.ordernumber=? 
    and biblio.biblionumber=aqorders.biblionumber and
    biblioitems.biblioitemnumber=aqorders.biblioitemnumber and
--- 185,190 ----
    my ($ordnum)address@hidden;
    my $dbh = C4::Context->dbh;
!   my $query="Select * from biblio,biblioitems,aqorders,aqorderbreakdown
!   where aqorders.ordernumber=?
    and biblio.biblionumber=aqorders.biblionumber and
    biblioitems.biblioitemnumber=aqorders.biblioitemnumber and
***************
*** 292,298 ****
    my $query="Select * from aqorders,biblio,biblioitems where 
booksellerid='$supid'
    and (cancelledby is NULL or cancelledby = '')
!   and biblio.biblionumber=aqorders.biblionumber and 
biblioitems.biblioitemnumber=                    
!   aqorders.biblioitemnumber 
!   group by aqorders.biblioitemnumber 
    order by
    biblio.title";
--- 253,259 ----
    my $query="Select * from aqorders,biblio,biblioitems where 
booksellerid='$supid'
    and (cancelledby is NULL or cancelledby = '')
!   and biblio.biblionumber=aqorders.biblionumber and 
biblioitems.biblioitemnumber=
!   aqorders.biblioitemnumber
!   group by aqorders.biblioitemnumber
    order by
    biblio.title";
***************
*** 317,325 ****
    my $query="Select * from aqorders,biblio,biblioitems where 
booksellerid='$supid'
    and (cancelledby is NULL or cancelledby = '')
!   and biblio.biblionumber=aqorders.biblionumber and 
biblioitems.biblioitemnumber=                    
    aqorders.biblioitemnumber and
    aqorders.quantityreceived>0
    and aqorders.datereceived >=now()
!   group by aqorders.biblioitemnumber 
    order by
    biblio.title";
--- 278,286 ----
    my $query="Select * from aqorders,biblio,biblioitems where 
booksellerid='$supid'
    and (cancelledby is NULL or cancelledby = '')
!   and biblio.biblionumber=aqorders.biblionumber and 
biblioitems.biblioitemnumber=
    aqorders.biblioitemnumber and
    aqorders.quantityreceived>0
    and aqorders.datereceived >=now()
!   group by aqorders.biblioitemnumber
    order by
    biblio.title";
***************
*** 387,391 ****
    }
    $query=~ s/ and $//;
!   $query.=" ) or biblioitems.isbn='$search' 
    or (aqorders.ordernumber='$search' and aqorders.biblionumber='$biblio')) ";
    if ($catview ne 'yes'){
--- 348,352 ----
    }
    $query=~ s/ and $//;
!   $query.=" ) or biblioitems.isbn='$search'
    or (aqorders.ordernumber='$search' and aqorders.biblionumber='$biblio')) ";
    if ($catview ne 'yes'){
***************
*** 500,512 ****
    my ($basketno,$supplier)address@hidden;
    my $dbh = C4::Context->dbh;
!   my $query="Select *,biblio.title from aqorders,biblio,biblioitems 
    where basketno='$basketno'
    and biblio.biblionumber=aqorders.biblionumber and 
biblioitems.biblioitemnumber
!   =aqorders.biblioitemnumber 
    and (datecancellationprinted is NULL or datecancellationprinted =
    '0000-00-00')";
    if (defined $supplier && $supplier ne ''){
      $query.=" and aqorders.booksellerid='$supplier'";
!   } 
    $query.=" group by aqorders.ordernumber";
    my $sth=$dbh->prepare($query);
--- 461,473 ----
    my ($basketno,$supplier)address@hidden;
    my $dbh = C4::Context->dbh;
!   my $query="Select *,biblio.title from aqorders,biblio,biblioitems
    where basketno='$basketno'
    and biblio.biblionumber=aqorders.biblionumber and 
biblioitems.biblioitemnumber
!   =aqorders.biblioitemnumber
    and (datecancellationprinted is NULL or datecancellationprinted =
    '0000-00-00')";
    if (defined $supplier && $supplier ne ''){
      $query.=" and aqorders.booksellerid='$supplier'";
!   }
    $query.=" group by aqorders.ordernumber";
    my $sth=$dbh->prepare($query);
***************
*** 572,576 ****
    my $dbh = C4::Context->dbh;
    my $query="Select * from aqbookfund,aqbudget where aqbookfund.bookfundid
!   =aqbudget.bookfundid 
     and aqbudget.startdate='2001-07-01'
    group by aqbookfund.bookfundid order by bookfundname";
--- 533,537 ----
    my $dbh = C4::Context->dbh;
    my $query="Select * from aqbookfund,aqbudget where aqbookfund.bookfundid
!   =aqbudget.bookfundid
     and aqbudget.startdate='2001-07-01'
    group by aqbookfund.bookfundid order by bookfundname";
***************
*** 623,627 ****
    my $dbh = C4::Context->dbh;
    my $query="Select 
quantity,datereceived,freight,unitprice,listprice,ecost,quantityreceived,subscription
!   from aqorders,aqorderbreakdown where bookfundid='$id' and 
     aqorders.ordernumber=aqorderbreakdown.ordernumber and ((budgetdate >=
     '2001-07-01' and budgetdate <'2002-07-01') or
--- 584,588 ----
    my $dbh = C4::Context->dbh;
    my $query="Select 
quantity,datereceived,freight,unitprice,listprice,ecost,quantityreceived,subscription
!   from aqorders,aqorderbreakdown where bookfundid='$id' and
     aqorders.ordernumber=aqorderbreakdown.ordernumber and ((budgetdate >=
     '2001-07-01' and budgetdate <'2002-07-01') or
***************
*** 711,715 ****
    my $query;
    my $sth;
!   
    $biblio->{'title'}         = $dbh->quote($biblio->{'title'});
    $biblio->{'author'}        = $dbh->quote($biblio->{'author'});
--- 672,676 ----
    my $query;
    my $sth;
! 
    $biblio->{'title'}         = $dbh->quote($biblio->{'title'});
    $biblio->{'author'}        = $dbh->quote($biblio->{'author'});
***************
*** 981,985 ****
    $biblioitem->{'lccn'}            = $dbh->quote($biblioitem->{'lccn'});
    $biblioitem->{'marc'}            = $dbh->quote($biblioitem->{'marc'});
!   
    $sth->execute;
    $data       = $sth->fetchrow_arrayref;
--- 942,946 ----
    $biblioitem->{'lccn'}            = $dbh->quote($biblioitem->{'lccn'});
    $biblioitem->{'marc'}            = $dbh->quote($biblioitem->{'marc'});
! 
    $sth->execute;
    $data       = $sth->fetchrow_arrayref;
***************
*** 1167,1171 ****
    my $dbh = C4::Context->dbh;
    my $query="update aqorders set title='$title',
!   quantity='$quantity',listprice='$listprice',basketno='$basketno', 
    rrp='$rrp',ecost='$ecost',unitprice='$cost',
    booksellerinvoicenumber='$invoice'
--- 1128,1132 ----
    my $dbh = C4::Context->dbh;
    my $query="update aqorders set title='$title',
!   quantity='$quantity',listprice='$listprice',basketno='$basketno',
    rrp='$rrp',ecost='$ecost',unitprice='$cost',
    booksellerinvoicenumber='$invoice'
***************
*** 1243,1247 ****
  #  print $query;
    $sth->execute;
!   $sth->finish;  
  }
  
--- 1204,1208 ----
  #  print $query;
    $sth->execute;
!   $sth->finish;
  }
  
***************
*** 1277,1281 ****
  #  print $query;
    $sth->execute;
!   $sth->finish;  
  }
  
--- 1238,1242 ----
  #  print $query;
    $sth->execute;
!   $sth->finish;
  }
  
***************
*** 1336,1340 ****
    $sth->finish;
    return($i,address@hidden);
! } 
  
  # FIXME - This function appears in C4::Catalogue. Neither one is used.
--- 1297,1301 ----
    $sth->finish;
    return($i,address@hidden);
! }
  
  # FIXME - This function appears in C4::Catalogue. Neither one is used.
***************
*** 1349,1353 ****
    $sth->finish;
    return($data);
! } 
  
  =item updatecurrencies
--- 1310,1314 ----
    $sth->finish;
    return($data);
! }
  
  =item updatecurrencies
***************
*** 1367,1371 ****
    $sth->execute;
    $sth->finish;
! } 
  
  =item updatesup
--- 1328,1332 ----
    $sth->execute;
    $sth->finish;
! }
  
  =item updatesup
***************
*** 1455,1459 ****
    $itemnumber = $data->{'max(itemnumber)'} + 1;
    $sth->finish;
!   
    $item->{'booksellerid'}     = $dbh->quote($item->{'booksellerid'});
    $item->{'homebranch'}       = $dbh->quote($item->{'homebranch'});
--- 1416,1420 ----
    $itemnumber = $data->{'max(itemnumber)'} + 1;
    $sth->finish;
! 
    $item->{'booksellerid'}     = $dbh->quote($item->{'booksellerid'});
    $item->{'homebranch'}       = $dbh->quote($item->{'homebranch'});
***************
*** 1572,1577 ****
    my ($biblionumber)address@hidden;
    my $dbh = C4::Context->dbh;
!   my $query="Select * from biblioitems,items,itemtypes where 
!   biblioitems.biblionumber=$biblionumber 
    and biblioitems.biblioitemnumber=items.biblioitemnumber and
    itemtypes.itemtype=biblioitems.itemtype
--- 1533,1538 ----
    my ($biblionumber)address@hidden;
    my $dbh = C4::Context->dbh;
!   my $query="Select * from biblioitems,items,itemtypes where
!   biblioitems.biblionumber=$biblionumber
    and biblioitems.biblioitemnumber=items.biblioitemnumber and
    itemtypes.itemtype=biblioitems.itemtype
***************
*** 1643,1647 ****
  
      $sth->execute;
!   
      if (@results = $sth->fetchrow_array) {
  
--- 1604,1608 ----
  
      $sth->execute;
! 
      if (@results = $sth->fetchrow_array) {
  
***************
*** 1688,1692 ****
        WHERE           biblioitemnumber = $biblioitemnumber
  EOT
!     
  } # sub deletebiblioitem
  
--- 1649,1653 ----
        WHERE           biblioitemnumber = $biblioitemnumber
  EOT
! 
  } # sub deletebiblioitem
  
***************
*** 1731,1735 ****
    my $count = 0;
    my @results;
!   
    $sth->execute;
      # || die "Cannot execute $query\n" . $sth->errstr;
--- 1692,1696 ----
    my $count = 0;
    my @results;
! 
    $sth->execute;
      # || die "Cannot execute $query\n" . $sth->errstr;
***************
*** 1738,1742 ****
      $count++;
    } # while
!   
    $sth->finish;
    return($count, @results);
--- 1699,1703 ----
      $count++;
    } # while
! 
    $sth->finish;
    return($count, @results);
***************
*** 1754,1758 ****
      my $count = 0;
      my @results;
!     
      $sth->execute;
        # || die "Cannot execute $query\n" . $sth->errstr;
--- 1715,1719 ----
      my $count = 0;
      my @results;
! 
      $sth->execute;
        # || die "Cannot execute $query\n" . $sth->errstr;
***************
*** 1761,1765 ****
        $count++;
      } # while
!     
      $sth->finish;
      return($count, @results);
--- 1722,1726 ----
        $count++;
      } # while
! 
      $sth->finish;
      return($count, @results);
***************
*** 1826,1830 ****
      my $count = 0;
      my @results;
!     
      $sth->execute;
        # || die "Cannot execute $query\n" . $sth->errstr;
--- 1787,1791 ----
      my $count = 0;
      my @results;
! 
      $sth->execute;
        # || die "Cannot execute $query\n" . $sth->errstr;
***************
*** 1833,1837 ****
        $count++;
      } # while
!     
      $sth->finish;
      return($count, @results);
--- 1794,1798 ----
        $count++;
      } # while
! 
      $sth->finish;
      return($count, @results);
***************
*** 1848,1852 ****
      my $sth;
      my @results;
!     
      $isbn  = $dbh->quote($isbn);
      $query = "Select biblio.* from biblio, biblioitems where
--- 1809,1813 ----
      my $sth;
      my @results;
! 
      $isbn  = $dbh->quote($isbn);
      $query = "Select biblio.* from biblio, biblioitems where
***************
*** 1854,1858 ****
  and isbn = $isbn";
      $sth   = $dbh->prepare($query);
!     
      $sth->execute;
      while (my $data = $sth->fetchrow_hashref) {
--- 1815,1819 ----
  and isbn = $isbn";
      $sth   = $dbh->prepare($query);
! 
      $sth->execute;
      while (my $data = $sth->fetchrow_hashref) {
***************
*** 1934,1943 ****
      my ($website) = @_;
      my $dbh = C4::Context->dbh;
!     
      $website->{'biblionumber'} = $dbh->quote($website->{'biblionumber'});
      $website->{'title'}        = $dbh->quote($website->{'title'});
      $website->{'description'}  = $dbh->quote($website->{'description'});
      $website->{'url'}          = $dbh->quote($website->{'url'});
!     
      $dbh->do(<<EOT);
        INSERT INTO     websites
--- 1895,1904 ----
      my ($website) = @_;
      my $dbh = C4::Context->dbh;
! 
      $website->{'biblionumber'} = $dbh->quote($website->{'biblionumber'});
      $website->{'title'}        = $dbh->quote($website->{'title'});
      $website->{'description'}  = $dbh->quote($website->{'description'});
      $website->{'url'}          = $dbh->quote($website->{'url'});
! 
      $dbh->do(<<EOT);
        INSERT INTO     websites
***************
*** 1964,1972 ****
      my ($website) = @_;
      my $dbh = C4::Context->dbh;
!     
      $website->{'title'}      = $dbh->quote($website->{'title'});
      $website->{'description'} = $dbh->quote($website->{'description'});
      $website->{'url'}        = $dbh->quote($website->{'url'});
!     
      $dbh->do(<<EOT);
        UPDATE  websites
--- 1925,1933 ----
      my ($website) = @_;
      my $dbh = C4::Context->dbh;
! 
      $website->{'title'}      = $dbh->quote($website->{'title'});
      $website->{'description'} = $dbh->quote($website->{'description'});
      $website->{'url'}        = $dbh->quote($website->{'url'});
! 
      $dbh->do(<<EOT);
        UPDATE  websites




reply via email to

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