From 5b80d3ba6532dd0ae911ff4a7ce5f266f30dc6f8 Mon Sep 17 00:00:00 2001 From: Andrew Isherwood Date: Mon, 9 Mar 2020 16:04:46 +0000 Subject: [PATCH] Bug 24083: (follow-up) Fix params to AddRenewal The merging of Bug 23051 has added a paramter that can be passed to C4::AddRenewal. This bug does also, so the offset of this bug's new paramter was wrong. This patch fixes it. Signed-off-by: Katrin Fischer Signed-off-by: Jonathan Druart --- C4/ILSDI/Services.pm | 2 +- misc/cronjobs/automatic_renewals.pl | 2 +- svc/renew | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/C4/ILSDI/Services.pm b/C4/ILSDI/Services.pm index 1e596932ba..da37e936ae 100644 --- a/C4/ILSDI/Services.pm +++ b/C4/ILSDI/Services.pm @@ -669,7 +669,7 @@ sub RenewLoan { # Add renewal if possible my @renewal = CanBookBeRenewed( $borrowernumber, $itemnumber ); - if ( $renewal[0] ) { AddRenewal( $borrowernumber, $itemnumber, undef, undef, undef, 0 ); } + if ( $renewal[0] ) { AddRenewal( $borrowernumber, $itemnumber, undef, undef, undef, undef, 0 ); } my $issue = $item->checkout; return unless $issue; # FIXME should be handled diff --git a/misc/cronjobs/automatic_renewals.pl b/misc/cronjobs/automatic_renewals.pl index a1027848ad..7c19e94b45 100755 --- a/misc/cronjobs/automatic_renewals.pl +++ b/misc/cronjobs/automatic_renewals.pl @@ -95,7 +95,7 @@ while ( my $auto_renew = $auto_renews->next ) { $auto_renew->issue_id, $auto_renew->borrowernumber, $auto_renew->itemnumber; } if ($confirm){ - my $date_due = AddRenewal( $auto_renew->borrowernumber, $auto_renew->itemnumber, $auto_renew->branchcode, undef, undef, 0 ); + my $date_due = AddRenewal( $auto_renew->borrowernumber, $auto_renew->itemnumber, $auto_renew->branchcode, undef, undef, undef, 0 ); $auto_renew->auto_renew_error(undef)->store; } push @{ $report{ $auto_renew->borrowernumber } }, $auto_renew; diff --git a/svc/renew b/svc/renew index 3e63f2e5d8..e7792ddd60 100755 --- a/svc/renew +++ b/svc/renew @@ -67,7 +67,7 @@ if ( $data->{error} && $data->{error} eq 'on_reserve' && C4::Context->preference } if ( $data->{renew_okay} ) { - $date_due = AddRenewal( $borrowernumber, $itemnumber, $branchcode, $date_due, undef, $seen ); + $date_due = AddRenewal( $borrowernumber, $itemnumber, $branchcode, $date_due, undef, undef, $seen ); $data->{date_due} = output_pref( { dt => $date_due, as_due_date => 1 } ); } -- 2.39.5