Our librarians requested the following feature: They want to renew a current issue till an arbitrary choosen day, overriding the issuing rules. We made a local customization to do that. we added this feature to the script availiable in koha 2.2.1, attached you'l find a patch to do this; developed by Ernesto Silva and me. Enjoy it, hope I can send a template in a few days, we modified the spanish templates. Andres --- /usr/local/src/packages/koha/koha-2.2.1/intranet-cgi/renewscript.pl.orig 2005-03-04 09:27:45.007947848 -0300 +++ renewscript.pl 2005-03-04 10:23:19.585015080 -0300 @@ -23,14 +23,19 @@ # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place, # Suite 330, Boston, MA 02111-1307 USA +# Revision History: +# 2005-04-03 E. Silva and A. Tarallo: We added a local customization to allow +# borrowing a book to an arbitry choosen date, overriding the issuing rules. +# To use this feature you must pass as parameters both stickyduedate_$itemno +# (a chek box) and date_$itemno (due date) for each item you want to renew. +# This CGI might be called from moremember.pl or circulation.pl; if you call +# it from circulation.pl you must pass the parameter destination with the +# value circ and cardnunber with the user cardnumber. + use CGI; -# use C4::Circulation::Renewals2; use C4::Circulation::Circ2; #get input my $input= new CGI; -#print $input->header; - -#print $input->dump; my @names=$input->param(); my $count=@names; @@ -48,19 +53,24 @@ my $cardnumber = $input->param("cardnumber"); my $bornum=$input->param("bornum"); while ( my ($itemno, $value) = each %data) { -# warn "$itemno = $value\n"; - if ($value eq 'y'){ - #means we want to renew this item - #check its status - my $status=renewstatus(\%env,$bornum,$itemno); - if ($status == 1){ - renewbook(\%env,$bornum,$itemno); - } - } + if ($value eq 'y'){ +#means we want to renew this item +#check its status + my $status=renewstatus(\%env,$bornum,$itemno); + if ($status == 1){ +# ORT: We enabled a way to override standard issuing rules. Items could be +# borrowed till a date filled by the operator. + if ($input->param("stickyduedate_$itemno")) { + renewbook(\%env,$bornum,$itemno,$data{"date_$itemno"}); + } else { + renewbook(\%env,$bornum,$itemno); + } + } + } } if($destination eq "circ"){ print $input->redirect("/cgi-bin/koha/circ/circulation.pl?findborrower=$cardnumber"); } else { print $input->redirect("/cgi-bin/koha/members/moremember.pl?bornum=$bornum"); -} \ No newline at end of file +}
participants (1)
-
Andrés Tarallo