[Koha-cvs] koha bull/routing-preview.pl koha-tmpl/intranet... [rel_2_2]

Chris Cormack crc at liblime.com
Mon Apr 23 05:37:05 CEST 2007


CVSROOT:	/sources/koha
Module name:	koha
Branch:		rel_2_2
Changes by:	Chris Cormack <rangi>	07/04/23 03:37:05

Modified files:
	bull           : routing-preview.pl 
	koha-tmpl/intranet-tmpl/npl/en/bull: routing.tmpl 

Log message:
	Now if itemlevelreserves is set routinglists will reserve at itemlevel

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/bull/routing-preview.pl?cvsroot=koha&only_with_tag=rel_2_2&r1=1.1.2.3&r2=1.1.2.4
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/npl/en/bull/routing.tmpl?cvsroot=koha&only_with_tag=rel_2_2&r1=1.1.2.1&r2=1.1.2.2

Patches:
Index: bull/routing-preview.pl
===================================================================
RCS file: /sources/koha/koha/bull/Attic/routing-preview.pl,v
retrieving revision 1.1.2.3
retrieving revision 1.1.2.4
diff -u -b -r1.1.2.3 -r1.1.2.4
--- bull/routing-preview.pl	11 Feb 2007 20:33:46 -0000	1.1.2.3
+++ bull/routing-preview.pl	23 Apr 2007 03:37:04 -0000	1.1.2.4
@@ -69,10 +69,23 @@
         my $data = $sth->fetchrow_hashref;
 	if($routinglist[$i]->{'borrowernumber'} == $data->{'borrowernumber'}){
 	    UpdateReserve($routinglist[$i]->{'ranking'},$biblio,$routinglist[$i]->{'borrowernumber'},$branch);
-        } else {
+	} 
+        else {
+	    if (C4::Context->preference('itemlevelreserves')){
+		my $sth=$dbh->prepare("SELECT itemnumber FROM items WHERE biblionumber=? and multivolumepart=?");
+		$sth->execute($biblio,$issue);
+		my @items;
+		while (my $item=$sth->fetchrow_hashref()){
+		    push @items,$item->{'itemnumber'};
+		}
+		$sth->finish();
+		CreateReserve(\$env,$branch,$routinglist[$i]->{'borrowernumber'},$biblio,$const,\@items,$routinglist[$i]->{'ranking'},$notes,$title);
+	    }
+	    else {		
             CreateReserve(\$env,$branch,$routinglist[$i]->{'borrowernumber'},$biblio,$const,\@bibitems,$routinglist[$i]->{'ranking'},$notes,$title);
 	}
     }
+    }
     
     
     ($template, $loggedinuser, $cookie)

Index: koha-tmpl/intranet-tmpl/npl/en/bull/routing.tmpl
===================================================================
RCS file: /sources/koha/koha/koha-tmpl/intranet-tmpl/npl/en/bull/Attic/routing.tmpl,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -u -b -r1.1.2.1 -r1.1.2.2
--- koha-tmpl/intranet-tmpl/npl/en/bull/routing.tmpl	24 Nov 2006 00:18:05 -0000	1.1.2.1
+++ koha-tmpl/intranet-tmpl/npl/en/bull/routing.tmpl	23 Apr 2007 03:37:05 -0000	1.1.2.2
@@ -28,7 +28,7 @@
 
 <select name="date_selected">
 <!-- TMPL_LOOP NAME="dates" -->
-<option value="<!-- TMPL_VAR NAME="serialseq" --> (<!-- TMPL_VAR NAME="planneddate" -->)" <!-- TMPL_IF NAME="selected" --> selected="SELECTED" <!-- /TMPL_IF -->><!-- TMPL_VAR NAME="serialseq" --> (<!-- TMPL_VAR NAME="planneddate" -->)</option>
+<option value="<!-- TMPL_VAR NAME="serialseq" -->" <!-- TMPL_IF NAME="selected" --> selected="SELECTED" <!-- /TMPL_IF -->><!-- TMPL_VAR NAME="serialseq" --> (<!-- TMPL_VAR NAME="planneddate" -->)</option>
 <!-- /TMPL_LOOP -->
 </select>
 





More information about the Koha-cvs mailing list