From c5d065be00351ddcaaa1896fdf0a530ea12ec36d 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. --- C4/ILSDI/Services.pm | 2 +- circ/renew.pl | 1 + misc/cronjobs/automatic_renewals.pl | 2 +- opac/opac-renew.pl | 2 +- svc/renew | 2 +- 5 files changed, 5 insertions(+), 4 deletions(-) diff --git a/C4/ILSDI/Services.pm b/C4/ILSDI/Services.pm index 13606fc836..11aabfaea4 100644 --- a/C4/ILSDI/Services.pm +++ b/C4/ILSDI/Services.pm @@ -644,7 +644,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/circ/renew.pl b/circ/renew.pl index 95e8c92bec..9b1f1de9fe 100755 --- a/circ/renew.pl +++ b/circ/renew.pl @@ -106,6 +106,7 @@ if ($barcode) { $branchcode, $date_due, undef, + undef, !$unseen ); $template->param( date_due => $date_due ); diff --git a/misc/cronjobs/automatic_renewals.pl b/misc/cronjobs/automatic_renewals.pl index f3e993db15..c07e673d86 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/opac/opac-renew.pl b/opac/opac-renew.pl index 37ae1e5970..f2d60e9e89 100755 --- a/opac/opac-renew.pl +++ b/opac/opac-renew.pl @@ -82,7 +82,7 @@ else { else { $branchcode = 'OPACRenew'; } - AddRenewal( $borrowernumber, $itemnumber, $branchcode, undef, undef, 0 ); + AddRenewal( $borrowernumber, $itemnumber, $branchcode, undef, undef, undef, 0 ); push( @renewed, $itemnumber ); } else { diff --git a/svc/renew b/svc/renew index 98d7498a7c..231f217aec 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.11.0