Without the patch, renewing from the renewal tab/page
led to wrong renewal/due dates.
To test:
- 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
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
}
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 );
}
}