@@ -, +, @@ - Check an item out to your patron account - Renew it from the patron account - Note the due date - Return the item - Check the item out again - Renew it using the renewal tab - Verify a different due date was calculated - Apply patch - Repeat test - due dates now should be the same --- circ/renew.pl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) --- a/circ/renew.pl +++ a/circ/renew.pl @@ -95,7 +95,11 @@ if ($barcode) { } if ($can_renew) { my $branchcode = C4::Context->userenv ? C4::Context->userenv->{'branch'} : undef; - my $date_due = AddRenewal( undef, $item->itemnumber(), $branchcode, dt_from_string( scalar $cgi->param('renewonholdduedate')) ); + my $date_due; + if ( $cgi->param('renewonholdduedate') ) { + $date_due = dt_from_string( scalar $cgi->param('renewonholdduedate')); + } + $date_due = AddRenewal( undef, $item->itemnumber(), $branchcode, $date_due ); $template->param( date_due => $date_due ); } } --