[Koha-cvs] koha/C4/Circulation Circ2.pm [dev_week]
Chris Cormack
chris at katipo.co.nz
Mon Feb 26 23:28:06 CET 2007
CVSROOT: /sources/koha
Module name: koha
Branch: dev_week
Changes by: Chris Cormack <rangi> 07/02/26 22:28:06
Modified files:
C4/Circulation : Circ2.pm
Log message:
Fix for issuing dates problem, loan lenght was effectively being doubled
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Circulation/Circ2.pm?cvsroot=koha&only_with_tag=dev_week&r1=1.87.2.14.2.15&r2=1.87.2.14.2.16
Patches:
Index: Circ2.pm
===================================================================
RCS file: /sources/koha/koha/C4/Circulation/Circ2.pm,v
retrieving revision 1.87.2.14.2.15
retrieving revision 1.87.2.14.2.16
diff -u -b -r1.87.2.14.2.15 -r1.87.2.14.2.16
--- Circ2.pm 25 Jan 2007 05:45:12 -0000 1.87.2.14.2.15
+++ Circ2.pm 26 Feb 2007 22:28:06 -0000 1.87.2.14.2.16
@@ -3,7 +3,7 @@
package C4::Circulation::Circ2;
-# $Id: Circ2.pm,v 1.87.2.14.2.15 2007/01/25 05:45:12 rych Exp $
+# $Id: Circ2.pm,v 1.87.2.14.2.16 2007/02/26 22:28:06 rangi Exp $
#package to deal with Returns
#written 3/11/99 by olwen at katipo.co.nz
@@ -916,8 +916,8 @@
# Record in the database the fact that the book was issued.
my $sth=$dbh->prepare("insert into issues (borrowernumber, itemnumber, date_due, branchcode) values (?,?,?,?)");
my $loanlength = getLoanLength($borrower->{'categorycode'},$iteminformation->{'itemtype'},$borrower->{'branchcode'});
- my $datedue=time+($loanlength)*86400;
- my @datearr = localtime($datedue);
+ # addDate below works out the due date
+ my @datearr = localtime();
my $dateduef = (1900+$datearr[5])."-".($datearr[4]+1)."-".$datearr[3];
# now calling addDate() from Calendar.pm
More information about the Koha-cvs
mailing list