5 #written 18/1/2000 by chris@katipo.co.nz
6 #script to renew items from the web
9 # Copyright 2000-2002 Katipo Communications
11 # This file is part of Koha.
13 # Koha is free software; you can redistribute it and/or modify it under the
14 # terms of the GNU General Public License as published by the Free Software
15 # Foundation; either version 2 of the License, or (at your option) any later
18 # Koha is distributed in the hope that it will be useful, but WITHOUT ANY
19 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
20 # A PARTICULAR PURPOSE. See the GNU General Public License for more details.
22 # You should have received a copy of the GNU General Public License along with
23 # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
24 # Suite 330, Boston, MA 02111-1307 USA
32 # find items to renew, all items or a selection of items
36 if ($input->param('renew_all')) {
37 @data = $input->param('all_items[]');
40 @data = $input->param('items[]');
42 my $branch=$input->param('branch');
46 my $cardnumber = $input->param("cardnumber");
47 my $borrowernumber = $input->param("borrowernumber");
49 foreach my $itemno (@data) {
50 #check status before renewing issue
51 # warn "CanBookbeRenewed";
52 if (CanBookBeRenewed($borrowernumber,$itemno)){
53 # warn "$itemno can be renewed for $borrowernumber";
54 AddRenewal($borrowernumber,$itemno,$branch);
55 # warn "renewal added";
57 # warn "cannot renew";
62 # redirection to the referrer page
64 if ($input->param('destination') eq "circ"){
65 print $input->redirect(
66 '/cgi-bin/koha/circ/circulation.pl?findborrower='.$cardnumber
70 print $input->redirect(
71 '/cgi-bin/koha/members/moremember.pl?borrowernumber='.$borrowernumber