[Koha-cvs] CVS: koha/C4/Circulation Circ2.pm,1.97,1.98
Chris Cormack
rangi at users.sourceforge.net
Fri Sep 23 01:30:41 CEST 2005
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'});
More information about the Koha-cvs
mailing list