koha-cvs
[Top][All Lists]
Advanced

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

[Koha-cvs] CVS: koha/C4/Circulation Circ2.pm,1.21.2.8,1.21.2.9


From: Finlay Thompson
Subject: [Koha-cvs] CVS: koha/C4/Circulation Circ2.pm,1.21.2.8,1.21.2.9
Date: Tue, 01 Oct 2002 00:12:54 -0700

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

Modified Files:
      Tag: rel-1-2
        Circ2.pm 
Log Message:

changes to getissues so that it can be used in opac-user.pl


Index: Circ2.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/Circulation/Circ2.pm,v
retrieving revision 1.21.2.8
retrieving revision 1.21.2.9
diff -C2 -r1.21.2.8 -r1.21.2.9
*** Circ2.pm    18 Sep 2002 22:53:27 -0000      1.21.2.8
--- Circ2.pm    1 Oct 2002 07:12:52 -0000       1.21.2.9
***************
*** 906,924 ****
      my $dbh=&C4Connect;
      my $borrowernumber = $borrower->{'borrowernumber'};
-     my $brn =$dbh->quote($borrowernumber);
      my %currentissues;
!     my $select = "select issues.timestamp, issues.date_due, 
items.biblionumber,
!                          items.barcode, biblio.title, biblio.author, 
biblioitems.dewey, 
!                          biblioitems.subclass 
!                     from issues,items,biblioitems,biblio
!                    where issues.borrowernumber = $brn 
!                      and issues.itemnumber = items.itemnumber 
!                      and items.biblionumber = biblio.biblionumber 
!                      and items.biblioitemnumber = 
biblioitems.biblioitemnumber 
!                      and issues.returndate is null
!                          order by issues.date_due";
  #    print $select;
      my $sth=$dbh->prepare($select);
!     $sth->execute;
      my $counter = 0;
      while (my $data = $sth->fetchrow_hashref) {
--- 906,930 ----
      my $dbh=&C4Connect;
      my $borrowernumber = $borrower->{'borrowernumber'};
      my %currentissues;
!     my $select = "SELECT issues.timestamp      AS timestamp, 
!                          issues.date_due       AS date_due, 
!                          items.biblionumber    AS biblionumber,
!                          items.barcode         AS barcode, 
!                          biblio.title          AS title, 
!                          biblio.author         AS author, 
!                          biblioitems.dewey     AS dewey, 
!                          itemtypes.description AS itemtype,
!                          biblioitems.subclass  AS subclass
!                     FROM issues,items,biblioitems,biblio, itemtypes
!                    WHERE issues.borrowernumber  = ?
!                      AND issues.itemnumber      = items.itemnumber 
!                      AND items.biblionumber     = biblio.biblionumber 
!                      AND items.biblioitemnumber = 
biblioitems.biblioitemnumber 
!                      AND itemtypes.itemtype     = biblioitems.itemtype
!                      AND issues.returndate      IS NULL
!                 ORDER BY issues.date_due";
  #    print $select;
      my $sth=$dbh->prepare($select);
!     $sth->execute($borrowernumber);
      my $counter = 0;
      while (my $data = $sth->fetchrow_hashref) {
***************
*** 1024,1027 ****
--- 1030,1036 ----
    # mark book as renewed
    my ($env,$dbh,$bornum,$itemno,$datedue)address@hidden;
+   if (!defined($dbh)){
+       $dbh=C4Connect();
+   }
    $datedue=$env->{'datedue'};
    if ($datedue eq "" ) {    
***************
*** 1065,1072 ****
  # Stolen from Issues.pm
  # calculate charges due
      my ($env, $dbh, $itemno, $bornum)address@hidden;
!     if (!defined($dbh)){
!       $dbh=C4Connect();
!     }
      my $charge=0;
  #    open (FILE,">>/tmp/charges");
--- 1074,1082 ----
  # Stolen from Issues.pm
  # calculate charges due
+     warn "Im in calc_charges!\n";
      my ($env, $dbh, $itemno, $bornum)address@hidden;
! 
!     $dbh=C4Connect() unless $dbh;
! 
      my $charge=0;
  #    open (FILE,">>/tmp/charges");
***************
*** 1076,1081 ****
      and (biblioitems.biblioitemnumber = items.biblioitemnumber) 
      and (biblioitems.itemtype = itemtypes.itemtype)";
      my $sth1= $dbh->prepare($q1);
! #    print FILE "$q1\n";
      $sth1->execute;
      if (my $data1=$sth1->fetchrow_hashref) {
--- 1086,1092 ----
      and (biblioitems.biblioitemnumber = items.biblioitemnumber) 
      and (biblioitems.itemtype = itemtypes.itemtype)";
+     warn "$q1\n";
      my $sth1= $dbh->prepare($q1);
! 
      $sth1->execute;
      if (my $data1=$sth1->fetchrow_hashref) {




reply via email to

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