[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Koha-devel] enhacements to renewscript.pl

From: Andrés Tarallo
Subject: [Koha-devel] enhacements to renewscript.pl
Date: Fri Mar 4 04:25:07 2005
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.2) Gecko/20040803

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.


--- /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 address@hidden;
@@ -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")) {
+                       } else { 
+                               renewbook(\%env,$bornum,$itemno); 
+                       }
+               }
+       }
 if($destination eq "circ"){
 } else {
\ No newline at end of file

reply via email to

[Prev in Thread] Current Thread [Next in Thread]