Browse Source

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 <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
tags/v20.11.00
Andrew Isherwood 1 year ago
parent
commit
5b80d3ba65
3 changed files with 3 additions and 3 deletions
  1. +1
    -1
      C4/ILSDI/Services.pm
  2. +1
    -1
      misc/cronjobs/automatic_renewals.pl
  3. +1
    -1
      svc/renew

+ 1
- 1
C4/ILSDI/Services.pm View File

@@ -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


+ 1
- 1
misc/cronjobs/automatic_renewals.pl View File

@@ -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;


+ 1
- 1
svc/renew View File

@@ -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 } );
}



Loading…
Cancel
Save