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.97,1.98


From: Chris Cormack
Subject: [Koha-cvs] CVS: koha/C4/Circulation Circ2.pm,1.97,1.98
Date: Thu, 22 Sep 2005 16:30:41 -0700

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

Modified Files:
        Circ2.pm 
Log Message:
Marks the item borrowed now on the items table


Index: Circ2.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/Circulation/Circ2.pm,v
retrieving revision 1.97
retrieving revision 1.98
diff -C2 -r1.97 -r1.98
*** Circ2.pm    31 Aug 2005 23:11:19 -0000      1.97
--- Circ2.pm    22 Sep 2005 23:30:37 -0000      1.98
***************
*** 87,90 ****
--- 87,106 ----
  }
  
+ =head2 itemborrowed
+ 
+ &itemseen($itemnum)
+ Mark item as borrowed. Is called when an item is issued.
+ C<$itemnum> is the item number
+ 
+ =cut
+ 
+ sub itemborrowed {
+       my ($itemnum) = @_;
+       my $dbh = C4::Context->dbh;
+       my $sth = $dbh->prepare("update items set itemlost=0, datelastborrowed  
= now() where items.itemnumber = ?");
+       $sth->execute($itemnum);
+       return;
+ }
+ 
  sub listitemsforinventory {
        my ($minlocation,$maxlocation,$datelastseen,$offset,$size) = @_;
***************
*** 891,894 ****
--- 907,911 ----
                $sth->finish;
                &itemseen($iteminformation->{'itemnumber'});
+               itemborrowed($iteminformation->{'itemnumber'});
                # If it costs to borrow this book, charge it to the patron's 
account.
                my ($charge,$itemtype)=calc_charges($env, 
$iteminformation->{'itemnumber'}, $borrower->{'borrowernumber'});




reply via email to

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