@@ -, +, @@ statistic line branchcode will be LibraryB statistic line branchcode will be LibraryB the statistic line branchcode will be *LibraryA* --- C4/Circulation.pm | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) --- a/C4/Circulation.pm +++ a/C4/Circulation.pm @@ -1301,12 +1301,13 @@ sub AddIssue { my $biblio = GetBiblioFromItemNumber( $item->{itemnumber} ); # check if we just renew the issue. - if ( $actualissue->{borrowernumber} eq $borrower->{'borrowernumber'} - and not $switch_onsite_checkout ) { + if ( $actualissue->{borrowernumber} eq $borrower->{borrowernumber} + and not $switch_onsite_checkout ) + { $datedue = AddRenewal( - $borrower->{'borrowernumber'}, - $item->{'itemnumber'}, - $branch, + $borrower->{borrowernumber}, + $item->{itemnumber}, + C4::Context->userenv ? C4::Context->userenv->{branch} : $branch, $datedue, $issuedate, # here interpreted as the renewal date ); --