Lines 78-96
$user ||= q{};
Link Here
|
78 |
our $branch = C4::Context->userenv->{'branch'}; |
78 |
our $branch = C4::Context->userenv->{'branch'}; |
79 |
|
79 |
|
80 |
if ( $input->param('paycollect') ) { |
80 |
if ( $input->param('paycollect') ) { |
|
|
81 |
output_and_exit_if_error($input, $cookie, $template, { check => 'csrf_token' }); |
81 |
print $input->redirect( |
82 |
print $input->redirect( |
82 |
"/cgi-bin/koha/members/paycollect.pl?borrowernumber=$borrowernumber&change_given=$change_given"); |
83 |
"/cgi-bin/koha/members/paycollect.pl?borrowernumber=$borrowernumber&change_given=$change_given"); |
83 |
} |
84 |
} |
84 |
elsif ( $input->param('payselected') ) { |
85 |
elsif ( $input->param('payselected') ) { |
|
|
86 |
output_and_exit_if_error($input, $cookie, $template, { check => 'csrf_token' }); |
85 |
payselected({ params => \@names }); |
87 |
payselected({ params => \@names }); |
86 |
} |
88 |
} |
87 |
elsif ( $input->param('writeoff_selected') ) { |
89 |
elsif ( $input->param('writeoff_selected') ) { |
|
|
90 |
output_and_exit_if_error($input, $cookie, $template, { check => 'csrf_token' }); |
88 |
payselected({ params => \@names, type => 'WRITEOFF' }); |
91 |
payselected({ params => \@names, type => 'WRITEOFF' }); |
89 |
} |
92 |
} |
90 |
elsif ( $input->param('woall') ) { |
93 |
elsif ( $input->param('woall') ) { |
|
|
94 |
output_and_exit_if_error($input, $cookie, $template, { check => 'csrf_token' }); |
91 |
writeoff_all(@names); |
95 |
writeoff_all(@names); |
92 |
} |
96 |
} |
93 |
elsif ( $input->param('apply_credits') ) { |
97 |
elsif ( $input->param('apply_credits') ) { |
|
|
98 |
output_and_exit_if_error($input, $cookie, $template, { check => 'csrf_token' }); |
94 |
apply_credits({ patron => $patron, cgi => $input }); |
99 |
apply_credits({ patron => $patron, cgi => $input }); |
95 |
} |
100 |
} |
96 |
elsif ( $input->param('confirm_writeoff') ) { |
101 |
elsif ( $input->param('confirm_writeoff') ) { |
Lines 130-138
elsif ( $input->param('confirm_writeoff') ) {
Link Here
|
130 |
|
135 |
|
131 |
for (@names) { |
136 |
for (@names) { |
132 |
if (/^pay_indiv_(\d+)$/) { |
137 |
if (/^pay_indiv_(\d+)$/) { |
|
|
138 |
output_and_exit_if_error($input, $cookie, $template, { check => 'csrf_token' }); |
133 |
my $line_no = $1; |
139 |
my $line_no = $1; |
134 |
redirect_to_paycollect( 'pay_individual', $line_no ); |
140 |
redirect_to_paycollect( 'pay_individual', $line_no ); |
135 |
} elsif (/^wo_indiv_(\d+)$/) { |
141 |
} elsif (/^wo_indiv_(\d+)$/) { |
|
|
142 |
output_and_exit_if_error($input, $cookie, $template, { check => 'csrf_token' }); |
136 |
my $line_no = $1; |
143 |
my $line_no = $1; |
137 |
redirect_to_paycollect( 'writeoff_individual', $line_no ); |
144 |
redirect_to_paycollect( 'writeoff_individual', $line_no ); |
138 |
} |
145 |
} |