<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
<title>Koha › Patrons › <!-- TMPL_IF NAME="unknowuser" -->Patron does not exist<!-- TMPL_ELSE -->Patron Details for <!-- TMPL_VAR NAME="firstname" --> <!-- TMPL_VAR NAME="surname" --> (<!-- TMPL_VAR NAME="cardnumber" -->)<!-- /TMPL_IF --></title>
<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<!-- TMPL_INCLUDE NAME="calendar.inc" -->
<script type="text/JavaScript" language="JavaScript">
//<![CDATA[
$(document).ready(function() {
</td>
<td><!-- TMPL_VAR NAME="charge" --></td>
<td><!-- TMPL_VAR NAME="replacementprice" --></td>
+ <!-- TMPL_IF NAME="renew_failed" -->
+ <td class="problem">Renewal Failed</td>
+ <!-- TMPL_ELSE -->
<td>
<!-- TMPL_IF name="norenew" -->
- <!-- TMPL_IF EXPR="norenew_reason eq 'on_reserve'" -->
- <a href="/cgi-bin/koha/reserve/request.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->">On Hold</a>
- <!-- /TMPL_IF -->
- <!-- TMPL_IF EXPR="norenew_reason eq 'too_many'" -->
- Too Many Renewals
- <!-- /TMPL_IF -->
+ <!-- TMPL_IF EXPR="norenew_reason eq 'on_reserve'" -->
+ <a href="/cgi-bin/koha/reserve/request.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->">On Hold</a>
+ <!-- /TMPL_IF -->
+ <!-- TMPL_IF EXPR="norenew_reason eq 'too_many'" -->
+ Too Many Renewals
+ <!-- /TMPL_IF -->
<!-- TMPL_ELSE -->
<!-- TMPL_IF NAME="red" -->
<input type="checkbox" name="items[]" value="<!-- TMPL_VAR NAME="itemnumber" -->" checked="checked" onClick="javascript:uncheck_sibling(this);" />
<!-- /TMPL_IF -->
<!-- /TMPL_IF -->
</td>
- <td><input type="checkbox" name="barcodes[]" value="<!-- TMPL_VAR NAME="barcode" -->" onClick="javascript:uncheck_sibling(this);" /></td>
- <!-- TMPL_IF NAME="renew_failed" -->
- <td>Renewal Failed</td>
- <!-- /TMPL_IF -->
+ <!-- /TMPL_IF -->
<!-- TMPL_IF NAME="return_failed" -->
- <td>Return Failed</td>
+ <td class="problem">Return Failed</td>
+ <!--TMPL_ELSE-->
+ <td><input type="checkbox" name="barcodes[]" value="<!-- TMPL_VAR NAME="barcode" -->" onClick="javascript:uncheck_sibling(this);" /></td>
<!-- /TMPL_IF -->
</tr>
<!-- /tmpl_loop -->
<!-- TMPL_UNLESS NAME="noItemTypeImages" --><td> </td><!-- /TMPL_UNLESS -->
<td colspan="5">Total replacement cost:</td>
<td><!-- TMPL_VAR NAME="totalprice" --></td>
- <td colspan="2"> </td>
+ <td colspan="2">
+ renewal due date :<input type="text" size="8" id="newduedate" name="newduedate" value="<!-- TMPL_VAR Name="newduedate" -->" />
+ <img src="<!-- TMPL_VAR Name="themelang" -->/lib/calendar/cal.gif" id="newduedate_button" alt="Show Calendar" />
+ <script type="text/javascript">
+ //<![CDATA[
+ Calendar.setup(
+ {
+ inputField : "newduedate",
+ ifFormat : "<!-- TMPL_VAR NAME="DHTMLcalendar_dateformat" -->",
+ button : "newduedate_button"
+ }
+ );
+ //]]>
+ </script>
+ </td>
</tr>
</table>
<fieldset class="action">
use CGI;
use C4::Circulation;
use C4::Auth;
-
+use C4::Dates qw/format_date_in_iso/;
+use strict;
my $input = new CGI;
#Set Up User_env
}
my @barcodes = $input->param('barcodes[]');
my $branch=$input->param('branch');
+my $datedue=C4::Dates->new($input->param('newduedate'));
# warn "barcodes : @barcodes";
#
# check status before renewing issue
my ($renewokay,$error) = CanBookBeRenewed($borrowernumber,$itemno);
if ($renewokay){
- AddRenewal($borrowernumber,$itemno,$branch);
+ AddRenewal($borrowernumber,$itemno,$branch,$datedue);
}
else {
$failedrenews.="&failedrenew=$itemno";