[Koha-patches] [PATCH] Allow renewal limits to be overridden on the circulation screen
Jesse Weaver
jesse.weaver at liblime.com
Thu Aug 28 18:56:45 CEST 2008
From: Pianohacker <pianohacker at gmail.com>
This patch creates a new system preference, AllowRenewalLimitOverride, that, if YES, allows the renewal limit to be manually overridden. It updates C4::Circulation and reserve/renewscript.pl to obey this.
---
C4/Circulation.pm | 4 +-
admin/systempreferences.pl | 1 +
circ/circulation.pl | 11 +-
installer/data/mysql/updatedatabase.pl | 7 +
.../intranet-tmpl/prog/en/css/staff-global.css | 2 -
.../prog/en/modules/circ/circulation.tmpl | 163 +++++++++++---------
kohaversion.pl | 2 +-
reserve/renewscript.pl | 3 +-
8 files changed, 109 insertions(+), 84 deletions(-)
diff --git a/C4/Circulation.pm b/C4/Circulation.pm
index 9e97d47..9e2bd34 100644
--- a/C4/Circulation.pm
+++ b/C4/Circulation.pm
@@ -1830,7 +1830,7 @@ already renewed the loan. $error will contain the reason the renewal can not pro
sub CanBookBeRenewed {
# check renewal status
- my ( $borrowernumber, $itemnumber ) = @_;
+ my ( $borrowernumber, $itemnumber, $override_limit ) = @_;
my $dbh = C4::Context->dbh;
my $renews = 1;
my $renewokay = 0;
@@ -1865,7 +1865,7 @@ sub CanBookBeRenewed {
if ( my $data2 = $sth2->fetchrow_hashref ) {
$renews = $data2->{'renewalsallowed'};
}
- if ( $renews && $renews > $data1->{'renewals'} ) {
+ if ( ( $renews && $renews > $data1->{'renewals'} ) || $override_limit ) {
$renewokay = 1;
}
else {
diff --git a/admin/systempreferences.pl b/admin/systempreferences.pl
index c81146e..ef53715 100755
--- a/admin/systempreferences.pl
+++ b/admin/systempreferences.pl
@@ -135,6 +135,7 @@ my %tabsysprefs;
$tabsysprefs{useDaysMode}="Circulation";
$tabsysprefs{ReservesNeedReturns}="Circulation";
$tabsysprefs{CircAutocompl}="Circulation";
+ $tabsysprefs{AllowRenewalLimitOverride}="Circulation";
$tabsysprefs{canreservefromotherbranches}="Circulation";
$tabsysprefs{finesMode}="Circulation";
$tabsysprefs{emailLibrarianWhenHoldIsPlaced}="Circulation";
diff --git a/circ/circulation.pl b/circ/circulation.pl
index f2af9be..cd55f32 100755
--- a/circ/circulation.pl
+++ b/circ/circulation.pl
@@ -716,10 +716,11 @@ $template->param( picture => 1 ) if $picture;
$template->param(
- debt_confirmed => $debt_confirmed,
- SpecifyDueDate => C4::Context->preference("SpecifyDueDate"),
- CircAutocompl => C4::Context->preference("CircAutocompl"),
- dateformat => C4::Context->preference("dateformat"),
- DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar(),
+ debt_confirmed => $debt_confirmed,
+ SpecifyDueDate => C4::Context->preference("SpecifyDueDate"),
+ CircAutocompl => C4::Context->preference("CircAutocompl"),
+ AllowRenewalLimitOverride => C4::Context->preference("AllowRenewalLimitOverride"),
+ dateformat => C4::Context->preference("dateformat"),
+ DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar(),
);
output_html_with_http_headers $query, $cookie, $template->output;
diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl
index 1dd86a1..e581882 100755
--- a/installer/data/mysql/updatedatabase.pl
+++ b/installer/data/mysql/updatedatabase.pl
@@ -1997,6 +1997,13 @@ if ( C4::Context->preference('Version') < TransformToNum($DBversion) ) {
SetVersion($DBversion);
}
+$DBversion = "3.01.00.002";
+if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
+ $dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('AllowRenewalLimitOverride', '0', 'if ON, allows renewal limits to be overridden on the circulation screen',NULL,'YesNo')");
+ print "Upgrade to $DBversion done (add new syspref)\n";
+ SetVersion ($DBversion);
+}
+
=item DropAllForeignKeys($table)
Drop all foreign keys of the table $table
diff --git a/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css b/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css
index cad0234..736904a 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css
+++ b/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css
@@ -757,13 +757,11 @@ fieldset.rows .inputnote {
background-color : #FFFF99;
}
.content_hidden {
- visibility:hidden; /* you propably don't need to change this one */
display:none;
}
/* the property for the displayed tab */
.content_visible {
- visibility:visible; /* you propably don't need to change this one */
display:block;
}
#newbiblio a, #addchild a, #newentry a, #newshelf a, #newmenuc .first-child, #newsupplier .first-child, #newlabel a, #newtemplate a, #newlabelbatch a, #newpatroncardbatch a, #newprofile a, #newsubscription a, #newdictionary a, #neworder a {
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tmpl
index 1229390..b9ace07 100755
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tmpl
@@ -9,26 +9,36 @@
<script type="text/JavaScript" language="JavaScript">
//<![CDATA[
$.tablesorter.addParser({
- id: 'articles',
- is: function(s) {return false; },
- format: function(s) { return s.toLowerCase().replace(/^(the|an|a) /,''); },
- type: 'text'
+ id: 'articles',
+ is: function(s) {return false; },
+ format: function(s) { return s.toLowerCase().replace(/^(the|an|a) /,''); },
+ type: 'text'
});
$(document).ready(function() {
$('#patronlists > ul').tabs();
- $.tablesorter.defaults.widgets = ['zebra'];
+ $.tablesorter.defaults.widgets = ['zebra'];
$("#issuest").tablesorter({<!-- TMPL_IF EXPR="dateformat eq 'metric'" -->
dateFormat: 'uk',<!-- /TMPL_IF -->
headers: { 1: { sorter: 'articles' },4:{sorter:false},5: { sorter: false },6:{sorter:false}}
});
$("#issuest").bind("sortEnd",function() {
$("#previous").parents("tr").remove(); // 'previous checkouts' header chokes table sorter
- });
+ });
$("#holdst").tablesorter({<!-- TMPL_IF EXPR="dateformat eq 'metric'" -->
dateFormat: 'uk',<!-- /TMPL_IF -->
sortList: [[0,0]],
headers: { 1: { sorter: 'articles' }}
- });
+ });
+
+ <!-- TMPL_IF NAME="AllowRenewalLimitOverride" -->
+ $( '#override_limit' ).click( function () {
+ if ( this.checked ) {
+ $( '.renewals-allowed' ).show(); $( '.renewals-disabled' ).hide();
+ } else {
+ $( '.renewals-allowed' ).hide(); $( '.renewals-disabled' ).show();
+ }
+ } ).attr( 'checked', false );
+ <!-- /TMPL_IF -->
});
//]]>
</script>
@@ -43,13 +53,13 @@ $.tablesorter.addParser({
<!-- TMPL_IF NAME="CGIselectborrower" -->
<div id="doc" class="yui-t7">
-
+
<div id="bd">
<div id="yui-main">
<div class="yui-g">
<!-- TMPL_ELSE -->
<div id="doc3" class="yui-t2">
-
+
<div id="bd">
<div id="yui-main">
<div class="yui-b">
@@ -94,7 +104,7 @@ $.tablesorter.addParser({
</ul>
<form method="post" action="/cgi-bin/koha/circ/circulation.pl">
-
+
<!-- TMPL_IF NAME="RESERVED" -->
<p>
<input type="checkbox" id="cancelreserve" name="cancelreserve" value="1" />
@@ -140,7 +150,7 @@ $.tablesorter.addParser({
<!-- TMPL_IF NAME="INVALID_DATE" -->
<li>The due date is invalid</li>
- <!-- /TMPL_IF -->
+ <!-- /TMPL_IF -->
<!-- TMPL_IF NAME="UNKNOWN_BARCODE" -->
<li>The barcode was not found</li>
<!-- /TMPL_IF -->
@@ -175,7 +185,7 @@ $.tablesorter.addParser({
<!-- TMPL_IF NAME="NOTSAMEBRANCH" -->
<li>This item belongs to <!-- TMPL_VAR NAME="itemhomebranch" --> and cannot be issued from this location.</li>
- <!-- /TMPL_IF -->
+ <!-- /TMPL_IF -->
</ul>
<!-- TMPL_IF NAME="memberofinstution" -->
@@ -229,14 +239,14 @@ No patron matched <span class="ex"><!-- TMPL_VAR name="message" --></span>
<fieldset id="circ_circulation_issue">
<label for="barcode">Checking out to <!-- TMPL_VAR name="firstname" --> <!-- TMPL_VAR name="surname" --> (<!-- TMPL_VAR NAME="cardnumber" -->) </label>
<div class="hint">Enter item barcode:</div>
-
+
<input type="text" name="barcode" id="barcode" class="barcode focus" size="14" /> <input type="submit" value="Check Out" />
-
+
<div class="date-select">
- <div class="hint">Specify Due Date:</div><input type="text" size="10" id="duedatespec" name="duedatespec" value="<!-- TMPL_VAR NAME="duedatespec" -->" />
+ <div class="hint">Specify Due Date:</div><input type="text" size="10" id="duedatespec" name="duedatespec" value="<!-- TMPL_VAR NAME="duedatespec" -->" />
<img src="<!-- TMPL_VAR Name="themelang" -->/lib/calendar/cal.gif" alt="Show Calendar" border="0" id="CalendarDueDate" style="cursor: pointer;" />
<script language="JavaScript" type="text/javascript">
- //<![CDATA[
+ //<![CDATA[
function validate1(date) {
var today = new Date();
if ( date < today ) {
@@ -280,11 +290,11 @@ No patron matched <span class="ex"><!-- TMPL_VAR name="message" --></span>
<input type="hidden" name="oldamount" value="<!-- TMPL_VAR NAME="amountold" -->" />
<!-- /TMPL_IF -->
</div>
-</fieldset>
+</fieldset>
</form></div><!-- /TMPL_UNLESS --><!-- /unless noissues -->
<!-- TMPL_IF NAME="noissues" --><div><!-- TMPL_ELSE --><div class="yui-u"><!-- /TMPL_IF -->
-
+
<!-- TMPL_IF NAME="flagged" -->
<!-- TMPL_IF NAME="noissues" -->
<h4>Checking out to <!-- TMPL_VAR name="firstname" --> <!-- TMPL_VAR name="surname" --> (<!-- TMPL_VAR NAME="cardnumber" -->)</h4>
@@ -292,17 +302,17 @@ No patron matched <span class="ex"><!-- TMPL_VAR name="message" --></span>
<!-- TMPL_ELSE -->
<div id="circmessages" class="circmessage attention">
<!-- /TMPL_IF -->
-
+
<h3><!-- TMPL_IF NAME="noissues" -->Cannot Check Out!<!-- TMPL_ELSE -->Attention:<!-- /TMPL_IF --></h3>
<ul>
-
+
<!-- TMPL_IF NAME = "warndeparture" -->
<li><span class="circ-hlt">Expiration:</span> Patron's card will expire soon.
Patron's card expires on <!-- TMPL_VAR NAME="expiry" --> <a href="/cgi-bin/koha/members/setstatus.pl?borrowernumber=<!-- TMPL_VAR NAME="borrowernumber" -->&cardnumber=<!-- TMPL_VAR NAME="cardnumber" -->&destination=circ&reregistration=y">Renew</a> or <a href="/cgi-bin/koha/members/memberentry.pl?op=modify&destination=circ&borrowernumber=<!-- TMPL_VAR NAME="borrowernumber" -->&categorycode=<!-- TMPL_VAR NAME="categorycode" -->">Edit Details</a>
-
+
</li>
<!-- /TMPL_IF -->
-
+
<!-- TMPL_IF NAME="returnbeforeexpiry" -->
<li><span class="circ-hlt">Set due date to expiry:</span> You have the ReturnBeforeExpiry system preference enabled this means if the
expiry date is before the date due, the date due will be set to the expiry date
@@ -312,25 +322,25 @@ No patron matched <span class="ex"><!-- TMPL_VAR name="message" --></span>
<!-- TMPL_IF NAME = "expired" -->
<li><span class="circ-hlt">Expiration:</span> Patron's card has expired.
Patron's card expired on <!-- TMPL_VAR NAME="expiry" --> <a href="/cgi-bin/koha/members/setstatus.pl?borrowernumber=<!-- TMPL_VAR NAME="borrowernumber" -->&cardnumber=<!-- TMPL_VAR NAME="cardnumber" -->&destination=circ&reregistration=y">Renew</a> or <a href="/cgi-bin/koha/members/memberentry.pl?op=modify&destination=circ&borrowernumber=<!-- TMPL_VAR NAME="borrowernumber" -->&categorycode=<!-- TMPL_VAR NAME="categorycode" -->">Edit Details</a>
-
+
</li>
<!-- /TMPL_IF -->
<!-- TMPL_IF NAME="gna" -->
<li class="blocker"><span class="circ-hlt">Address:</span> Patron's address in doubt</li>
<!-- /TMPL_IF -->
-
+
<!-- TMPL_IF NAME="lost" -->
<li class="blocker"><span class="circ-hlt">Lost: </span>Patron's card is lost</li>
<!-- /TMPL_IF -->
-
+
<!-- TMPL_IF NAME="dbarred" --><li class="blocker">
<span class="circ-hlt"> Restricted:</span> Patron's account is restricted <a href="/cgi-bin/koha/members/setstatus.pl?borrowernumber=<!-- TMPL_VAR NAME="borrowernumber" -->&cardnumber=<!-- TMPL_VAR NAME="cardnumber" -->&destination=circ&status=0">Lift restriction</a>
</li><!-- /TMPL_IF -->
<!-- TMPL_IF name="odues" --><li><!-- TMPL_IF name="nonreturns" --><span class="circ-hlt">Overdues:</span> Patron has <span class="circ-hlt">ITEMS OVERDUE</span>. See highlighted items <a href="#checkouts">below</a><!-- /TMPL_IF --></li>
<!-- /TMPL_IF -->
-
+
<!-- TMPL_IF NAME="charges" -->
<!-- TMPL_IF NAME="charges_is_blocker" -->
<li class="blocker">
@@ -348,19 +358,19 @@ No patron matched <span class="ex"><!-- TMPL_VAR name="message" --></span>
<li><span class="circ-hlt">Credits:</span> Patron has a credit</li>
<!-- /TMPL_IF -->
-
+
</ul>
</div>
- <!-- TMPL_IF NAME="WaitingReserveLoop" -->
+ <!-- TMPL_IF NAME="WaitingReserveLoop" -->
<div id="holdswaiting" class="circmessage">
<h4>Holds waiting:</h4>
<!-- TMPL_LOOP NAME="WaitingReserveLoop" -->
- <ul>
+ <ul>
<li> <a href="/cgi-bin/koha/reserve/request.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->"><!-- TMPL_VAR NAME="title"--></a> (<!-- TMPL_VAR NAME="itemtype"-->), <!-- TMPL_IF NAME="author" -->by <!-- TMPL_VAR NAME="author"--><!-- /TMPL_IF --> Hold placed on <!-- TMPL_VAR NAME="reservedate"-->.
<!-- TMPL_IF NAME="waitingat" -->
- <br /><!-- TMPL_IF NAME="waitinghere" --><strong class="waitinghere"><!-- TMPL_ELSE --><strong><!-- /TMPL_IF -->Waiting at <!-- TMPL_VAR NAME="waitingat" --></strong>
+ <br /><!-- TMPL_IF NAME="waitinghere" --><strong class="waitinghere"><!-- TMPL_ELSE --><strong><!-- /TMPL_IF -->Waiting at <!-- TMPL_VAR NAME="waitingat" --></strong>
<!-- /TMPL_IF -->
</li>
</ul>
@@ -372,7 +382,7 @@ No patron matched <span class="ex"><!-- TMPL_VAR name="message" --></span>
<h4>Notes:</h4>
<p><span class="circ-hlt"><!-- TMPL_VAR name="notesmsg" --></span></p>
</div>
- <!-- /If notes --><!-- /TMPL_IF -->
+ <!-- /If notes --><!-- /TMPL_IF -->
<!-- /If flagged --><!-- /TMPL_IF -->
@@ -381,7 +391,7 @@ No patron matched <span class="ex"><!-- TMPL_VAR name="message" --></span>
<div class="yui-g"><div id="patronlists" class="toptabs">
-<ul>
+<ul>
<li> <!--TMPL_IF NAME="issuecount"-->
<a href="/cgi-bin/koha/circ/circulation.pl#checkouts"><!-- TMPL_VAR NAME="issuecount"--> Checkout(s)</a>
<!-- TMPL_ELSE -->
@@ -392,7 +402,7 @@ No patron matched <span class="ex"><!-- TMPL_VAR name="message" --></span>
<!-- TMPL_ELSE -->
<a href="/cgi-bin/koha/circ/circulation.pl#reserves">0 Holds</a>
<!-- /TMPL_IF --></li>
-
+
</ul>
<!-- SUMMARY : TODAY & PREVIOUS ISSUES -->
@@ -402,7 +412,7 @@ No patron matched <span class="ex"><!-- TMPL_VAR name="message" --></span>
<input type="hidden" value="circ" name="destination" />
<input type="hidden" name="cardnumber" value="<!-- TMPL_VAR NAME="cardnumber" -->" />
<input type="hidden" name="borrowernumber" value="<!-- TMPL_VAR NAME="borrowernumber" -->" />
- <input type="hidden" name="branch" value="<!-- TMPL_VAR NAME="branch" -->" />
+ <input type="hidden" name="branch" value="<!-- TMPL_VAR NAME="branch" -->" />
<table id="issuest">
<thead><tr>
<th>Due date</th>
@@ -433,29 +443,31 @@ No patron matched <span class="ex"><!-- TMPL_VAR name="message" --></span>
<td><!-- TMPL_VAR NAME="itemcallnumber" --></td>
<td><!-- TMPL_VAR NAME="barcode" --></td>
<td>
- <!-- TMPL_IF NAME="can_renew" -->
- <input type="checkbox" name="all_items[]" value="<!-- TMPL_VAR NAME="itemnumber" -->" checked="checked" style="display: none;" />
- <!-- TMPL_IF NAME="od" -->
- <input type="checkbox" name="items[]" value="<!-- TMPL_VAR NAME="itemnumber" -->" checked="checked" />
- <!-- TMPL_ELSE -->
- <input type="checkbox" name="items[]" value="<!-- TMPL_VAR NAME="itemnumber" -->" />
- <!-- /TMPL_IF -->
- <!-- TMPL_ELSE -->
- <!-- TMPL_IF NAME="renew_error_on_reserve" -->
- On Hold
- <!-- /TMPL_IF -->
- <!-- TMPL_IF NAME="renew_error_too_many" -->
- Too Many Renewals
- <!-- /TMPL_IF -->
- <!-- /TMPL_IF -->
+ <!-- TMPL_UNLESS NAME="can_renew" --><span class="renewals-allowed content_hidden"><!-- /TMPL_UNLESS -->
+ <input type="checkbox" name="all_items[]" value="<!-- TMPL_VAR NAME="itemnumber" -->" checked="checked" style="display: none;" />
+ <!-- TMPL_IF NAME="od" -->
+ <input type="checkbox" name="items[]" value="<!-- TMPL_VAR NAME="itemnumber" -->" checked="checked" />
+ <!-- TMPL_ELSE -->
+ <input type="checkbox" name="items[]" value="<!-- TMPL_VAR NAME="itemnumber" -->" />
+ <!-- /TMPL_IF -->
+ <!-- TMPL_UNLESS NAME="can_renew" --></span>
+ <span class="renewals-disabled">
+ <!-- TMPL_IF NAME="renew_error_on_reserve" -->
+ On Hold
+ <!-- /TMPL_IF -->
+ <!-- TMPL_IF NAME="renew_error_too_many" -->
+ Too Many Renewals
+ <!-- /TMPL_IF -->
+ </span>
+ <!-- /TMPL_UNLESS -->
</td>
- <td><a href="/cgi-bin/koha/circ/returns.pl?barcode=<!-- TMPL_VAR NAME="barcode" -->">Check In</a></td>
- <!-- TMPL_IF NAME="renew_failed" -->
- <td>Renewal Failed</td>
- <!-- /TMPL_IF -->
+ <td><a href="/cgi-bin/koha/circ/returns.pl?barcode=<!-- TMPL_VAR NAME="barcode" -->">Check In</a></td>
+ <!-- TMPL_IF NAME="renew_failed" -->
+ <td>Renewal Failed</td>
+ <!-- /TMPL_IF -->
</tr>
<!-- /TMPL_LOOP --> <!-- /loop todayissues -->
- <!-- /if todayissues --><!-- /TMPL_IF -->
+ <!-- /if todayissues --><!-- /TMPL_IF -->
<!-- TMPL_IF NAME="previssues" -->
<!-- TMPL_IF NAME="todayissues" --><tr><th colspan="7"><a name="previous" id="previous"></a>Previous checkouts</th></tr><!-- TMPL_ELSE -->
<tr><th class="{sorter: false}" colspan="7"><a name="previous" id="previous"></a>Previous checkouts</th></tr></thead>
@@ -480,22 +492,23 @@ No patron matched <span class="ex"><!-- TMPL_VAR name="message" --></span>
<td><!-- TMPL_VAR NAME="itemcallnumber" --></td>
<td><!-- TMPL_VAR NAME="barcode" --></td>
<td>
- <!-- TMPL_IF NAME="can_renew" -->
+ <!-- TMPL_UNLESS NAME="can_renew" --><span class="renewals-allowed content_hidden"><!-- /TMPL_UNLESS -->
<input type="checkbox" name="all_items[]" value="<!-- TMPL_VAR NAME="itemnumber" -->" checked="checked" style="display: none;" />
- <!-- TMPL_IF NAME="od" -->
- <input type="checkbox" name="items[]" value="<!-- TMPL_VAR NAME="itemnumber" -->" checked="checked" />
- <!-- TMPL_ELSE -->
- <input type="checkbox" name="items[]" value="<!-- TMPL_VAR NAME="itemnumber" -->" />
- <!-- /TMPL_IF -->
- <!-- TMPL_ELSE -->
- <!-- TMPL_IF NAME="renew_error_on_reserve" -->
- On Hold
- <!-- /TMPL_IF -->
- <!-- TMPL_IF NAME="renew_error_too_many" -->
- Too Many Renewals
- <!-- /TMPL_IF -->
-
- <!-- /TMPL_IF -->
+ <!-- TMPL_IF NAME="od" -->
+ <input type="checkbox" name="items[]" value="<!-- TMPL_VAR NAME="itemnumber" -->" checked="checked" />
+ <!-- TMPL_ELSE -->
+ <input type="checkbox" name="items[]" value="<!-- TMPL_VAR NAME="itemnumber" -->" />
+ <!-- /TMPL_IF -->
+ <!-- TMPL_UNLESS NAME="can_renew" --></span>
+ <span class="renewals-disabled">
+ <!-- TMPL_IF NAME="renew_error_on_reserve" -->
+ On Hold
+ <!-- /TMPL_IF -->
+ <!-- TMPL_IF NAME="renew_error_too_many" -->
+ Too Many Renewals
+ <!-- /TMPL_IF -->
+ </span>
+ <!-- /TMPL_UNLESS -->
</td>
<td><a href="/cgi-bin/koha/circ/returns.pl?barcode=<!-- TMPL_VAR NAME="barcode" -->">Check In</a></td>
<!-- TMPL_IF NAME="renew_failed" -->
@@ -503,12 +516,16 @@ No patron matched <span class="ex"><!-- TMPL_VAR name="message" --></span>
<!-- /TMPL_IF -->
</tr>
- <!-- /loop previssues --><!-- /TMPL_LOOP -->
-<!--/if previssues --><!-- /TMPL_IF -->
+ <!-- /loop previssues --><!-- /TMPL_LOOP -->
+<!--/if previssues --><!-- /TMPL_IF -->
</tbody>
</table>
- <!--TMPL_IF NAME="issuecount"-->
+ <!--TMPL_IF NAME="issuecount"-->
<fieldset class="action">
+ <!-- TMPL_IF NAME="AllowRenewalLimitOverride" -->
+ <label for="override_limit">Override Renewal Limit:</label>
+ <input type="checkbox" name="override_limit" id="override_limit" value="1" />
+ <!-- /TMPL_IF -->
<input type="submit" name="renew_checked" value="Renew Checked Items" />
<input type="submit" name="renew_all" value="Renew All" />
</fieldset>
@@ -546,7 +563,7 @@ No patron matched <span class="ex"><!-- TMPL_VAR name="message" --></span>
<!-- /TMPL_IF -->
<!-- TMPL_IF name="nottransfered" --> hasn't been transfered yet from <!-- TMPL_VAR NAME="nottransferedby" --></i>
<!-- /TMPL_IF --></em></td>
- <td>
+ <td>
<!-- TMPL_IF NAME="waitingposition" -->
Hold priority
<b> <!-- TMPL_VAR NAME="waitingposition" --> </b><!-- /TMPL_IF -->
diff --git a/kohaversion.pl b/kohaversion.pl
index 9a9221f..6449588 100644
--- a/kohaversion.pl
+++ b/kohaversion.pl
@@ -10,7 +10,7 @@
use strict;
sub kohaversion {
- our $VERSION = '3.01.00.001';
+ our $VERSION = '3.01.00.002';
# version needs to be set this way
# so that it can be picked up by Makefile.PL
# during install
diff --git a/reserve/renewscript.pl b/reserve/renewscript.pl
index 48e6076..f4b2a65 100755
--- a/reserve/renewscript.pl
+++ b/reserve/renewscript.pl
@@ -75,10 +75,11 @@ if ($input->param('newduedate')){
my $cardnumber = $input->param("cardnumber");
my $borrowernumber = $input->param("borrowernumber");
my $exemptfine = $input->param("exemptfine") || 0;
+my $override_limit = $input->param("override_limit") || 0;
my $failedrenews;
foreach my $itemno (@data) {
# check status before renewing issue
- my ($renewokay,$error) = CanBookBeRenewed($borrowernumber,$itemno);
+ my ($renewokay,$error) = CanBookBeRenewed($borrowernumber,$itemno,$override_limit);
if ($renewokay){
AddRenewal($borrowernumber,$itemno,$branch,$datedue);
}
--
1.5.3.7
More information about the Koha-patches
mailing list