Lines 62-87
else {
Link Here
|
62 |
my ( $status, $error ) = |
62 |
my ( $status, $error ) = |
63 |
CanBookBeRenewed( $borrowernumber, $itemnumber ); |
63 |
CanBookBeRenewed( $borrowernumber, $itemnumber ); |
64 |
if ( $status == 1 && $opacrenew == 1 ) { |
64 |
if ( $status == 1 && $opacrenew == 1 ) { |
65 |
my $renewalbranch = C4::Context->preference('OpacRenewalBranch'); |
65 |
AddRenewal( $borrowernumber, $itemnumber ); |
66 |
my $branchcode; |
|
|
67 |
if ( $renewalbranch eq 'itemhomebranch' ) { |
68 |
my $item = GetItem($itemnumber); |
69 |
$branchcode = $item->{'homebranch'}; |
70 |
} |
71 |
elsif ( $renewalbranch eq 'patronhomebranch' ) { |
72 |
$branchcode = Koha::Patrons->find( $borrowernumber )->branchcode; |
73 |
} |
74 |
elsif ( $renewalbranch eq 'checkoutbranch' ) { |
75 |
my $issue = GetOpenIssue($itemnumber); |
76 |
$branchcode = $issue->{'branchcode'}; |
77 |
} |
78 |
elsif ( $renewalbranch eq 'NULL' ) { |
79 |
$branchcode = ''; |
80 |
} |
81 |
else { |
82 |
$branchcode = 'OPACRenew'; |
83 |
} |
84 |
AddRenewal( $borrowernumber, $itemnumber, $branchcode, undef, undef ); |
85 |
push( @renewed, $itemnumber ); |
66 |
push( @renewed, $itemnumber ); |
86 |
} |
67 |
} |
87 |
else { |
68 |
else { |
88 |
- |
|
|