|
Lines 23-28
Link Here
|
| 23 |
# along with Koha; if not, see <http://www.gnu.org/licenses>. |
23 |
# along with Koha; if not, see <http://www.gnu.org/licenses>. |
| 24 |
|
24 |
|
| 25 |
use Modern::Perl; |
25 |
use Modern::Perl; |
|
|
26 |
use URI::Escape; |
| 26 |
|
27 |
|
| 27 |
use C4::Auth; |
28 |
use C4::Auth; |
| 28 |
use C4::Output; |
29 |
use C4::Output; |
|
Lines 52-58
my $borrowernumber = $input->param('borrowernumber');
Link Here
|
| 52 |
my $payment_id = $input->param('payment_id'); |
53 |
my $payment_id = $input->param('payment_id'); |
| 53 |
my $change_given = $input->param('change_given'); |
54 |
my $change_given = $input->param('change_given'); |
| 54 |
my $action = $input->param('action') || ''; |
55 |
my $action = $input->param('action') || ''; |
| 55 |
my @renew_errors = $input->param('renew_error'); |
56 |
my @renew_results = $input->param('renew_result'); |
| 56 |
|
57 |
|
| 57 |
my $logged_in_user = Koha::Patrons->find( $loggedinuser ) or die "Not logged in"; |
58 |
my $logged_in_user = Koha::Patrons->find( $loggedinuser ) or die "Not logged in"; |
| 58 |
my $patron = Koha::Patrons->find( $borrowernumber ); |
59 |
my $patron = Koha::Patrons->find( $borrowernumber ); |
|
Lines 84-94
if($total <= 0){
Link Here
|
| 84 |
|
85 |
|
| 85 |
# Populate an arrayref with everything we need to display any |
86 |
# Populate an arrayref with everything we need to display any |
| 86 |
# renew errors that occurred based on what we were passed |
87 |
# renew errors that occurred based on what we were passed |
| 87 |
my $renew_errors_display = []; |
88 |
my $renew_results_display = []; |
| 88 |
foreach my $renew_error(@renew_errors) { |
89 |
foreach my $renew_result(@renew_results) { |
| 89 |
my ($itemnumber, $error) = split(/,/, $renew_error); |
90 |
my ($itemnumber, $success, $info) = split(/,/, $renew_result); |
| 90 |
my $item = Koha::Items->find($itemnumber); |
91 |
my $item = Koha::Items->find($itemnumber); |
| 91 |
push @{$renew_errors_display}, { item => $item, error => $error }; |
92 |
if ($success) { |
|
|
93 |
$info = uri_unescape($info); |
| 94 |
} |
| 95 |
push @{$renew_results_display}, { |
| 96 |
item => $item, |
| 97 |
success => $success, |
| 98 |
info => $info |
| 99 |
}; |
| 92 |
} |
100 |
} |
| 93 |
|
101 |
|
| 94 |
$template->param( |
102 |
$template->param( |
|
Lines 99-105
$template->param(
Link Here
|
| 99 |
accounts => \@accountlines, |
107 |
accounts => \@accountlines, |
| 100 |
payment_id => $payment_id, |
108 |
payment_id => $payment_id, |
| 101 |
change_given => $change_given, |
109 |
change_given => $change_given, |
| 102 |
renew_errors => $renew_errors_display, |
110 |
renew_results => $renew_results_display, |
| 103 |
); |
111 |
); |
| 104 |
|
112 |
|
| 105 |
output_html_with_http_headers $input, $cookie, $template->output; |
113 |
output_html_with_http_headers $input, $cookie, $template->output; |