[Koha-cvs] koha/circ circulation.pl [rel_2_2]

Joshua Ferraro jmf at kados.org
Mon Mar 13 22:51:30 CET 2006


CVSROOT:	/sources/koha
Module name:	koha
Branch: 	rel_2_2
Changes by:	Joshua Ferraro <kados at savannah.gnu.org>	06/03/13 21:51:30

Modified files:
	circ           : circulation.pl 

Log message:
	adding ability to set 'renewaldate' to allow a 'renew' button from
	circ screen as requested by NPL.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/koha/circ/circulation.pl.diff?only_with_tag=rel_2_2&tr1=1.81.2.11&tr2=1.81.2.12&r1=text&r2=text

Patches:
Index: koha/circ/circulation.pl
diff -u koha/circ/circulation.pl:1.81.2.11 koha/circ/circulation.pl:1.81.2.12
--- koha/circ/circulation.pl:1.81.2.11	Wed Mar  8 22:59:33 2006
+++ koha/circ/circulation.pl	Mon Mar 13 21:51:30 2006
@@ -124,12 +124,16 @@
 if ($borrowernumber) {
 	$borrower = getpatroninformation(\%env,$borrowernumber,0);
 	my ($od,$issue,$fines)=borrdata2(\%env,$borrowernumber);
-	warn $borrower->{'expiry'};
+	#warn $borrower->{'expiry'};
  	my $warningdate = DateCalc($borrower->{'expiry'},"- ".C4::Context->preference('NotifyBorrowerDeparture')."  days");
+	my $offset = '+ 30 days';
+	my $renewaldate = DateCalc($warningdate, $offset);
+	$renewaldate = UnixDate($renewaldate,'%Y-%m-%d');
 	my $warning=Date_Cmp(ParseDate("today"),$warningdate);
 	if ($warning>0){ 
 		#borrowercard expired
-		$template->param(warndeparture=>$warning);
+		$template->param(warndeparture=>$warning,
+				renewaldate=>$renewaldate);
 	}
 	$template->param(overduecount => $od,
 							issuecount => $issue,





More information about the Koha-cvs mailing list