[Koha-cvs] koha/C4/Circulation Circ2.pm [dev_week]
Kyle Hall
kyle.m.hall at gmail.com
Fri Mar 16 16:50:09 CET 2007
CVSROOT: /sources/koha
Module name: koha
Branch: dev_week
Changes by: Kyle Hall <kylemhall> 07/03/16 15:50:09
Modified files:
C4/Circulation : Circ2.pm
Log message:
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.16&r2=1.87.2.14.2.17
Patches:
Index: Circ2.pm
===================================================================
RCS file: /sources/koha/koha/C4/Circulation/Circ2.pm,v
retrieving revision 1.87.2.14.2.16
retrieving revision 1.87.2.14.2.17
diff -u -b -r1.87.2.14.2.16 -r1.87.2.14.2.17
--- Circ2.pm 26 Feb 2007 22:28:06 -0000 1.87.2.14.2.16
+++ Circ2.pm 16 Mar 2007 15:50:09 -0000 1.87.2.14.2.17
@@ -3,7 +3,7 @@
package C4::Circulation::Circ2;
-# $Id: Circ2.pm,v 1.87.2.14.2.16 2007/02/26 22:28:06 rangi Exp $
+# $Id: Circ2.pm,v 1.87.2.14.2.17 2007/03/16 15:50:09 kylemhall Exp $
#package to deal with Returns
#written 3/11/99 by olwen at katipo.co.nz
@@ -916,7 +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'});
- # addDate below works out the due date
+ warn "LOANLENGTH:".$loanlength;
+ #my $datedue=time+($loanlength)*86400;
my @datearr = localtime();
my $dateduef = (1900+$datearr[5])."-".($datearr[4]+1)."-".$datearr[3];
@@ -924,7 +925,10 @@
my $calendar = C4::Calendar::Calendar->new(branchcode => $borrower->{'branchcode'});
my ($yeardue, $monthdue, $daydue) = split /-/, $dateduef;
($daydue, $monthdue, $yeardue) = $calendar->addDate($daydue, $monthdue, $yeardue, $loanlength);
- $dateduef = "$yeardue-".sprintf ("%0.2d", $monthdue)."-". sprintf("%0.2d",$daydue);
+ $dateduef = "$yeardue-". sprintf("%0.2d", $monthdue)."-". sprintf("%0.2d",$daydue);
+
+ warn "DATEDUEF:".$dateduef;
+ warn "DATE:".$date;
if ($date) {
$dateduef=$date;
@@ -961,6 +965,7 @@
sub getLoanLength {
my ($borrowertype,$itemtype,$branchcode) = @_;
+ warn "incoming vars:".$borrowertype." ".$itemtype." ".$branchcode;
my $dbh = C4::Context->dbh;
my $sth = $dbh->prepare("select issuelength from issuingrules where categorycode=? and itemtype=? and branchcode=?");
# try to find issuelength & return the 1st available.
@@ -1558,6 +1563,7 @@
my $borrowernumber = $borrower->{'borrowernumber'};
my %currentissues;
my $select = "SELECT items.*,issues.timestamp AS timestamp,
+ items.holdingbranch AS holdingbranch,
issues.date_due AS date_due,
items.barcode AS barcode,
biblio.title AS title,
More information about the Koha-cvs
mailing list