From e7e3a6afcb7a5cc12da7b67ca46f07789514244a Mon Sep 17 00:00:00 2001 From: kados Date: Mon, 13 Mar 2006 21:51:30 +0000 Subject: [PATCH] adding ability to set 'renewaldate' to allow a 'renew' button from circ screen as requested by NPL. --- circ/circulation.pl | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/circ/circulation.pl b/circ/circulation.pl index 91340c1bae..54e1d931d2 100755 --- a/circ/circulation.pl +++ b/circ/circulation.pl @@ -124,12 +124,16 @@ my $borrower; 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, -- 2.39.5