Lines 25-31
use C4::Context;
Link Here
|
25 |
use C4::Auth; |
25 |
use C4::Auth; |
26 |
use C4::Output; |
26 |
use C4::Output; |
27 |
use C4::Members; |
27 |
use C4::Members; |
28 |
use C4::Members::Attributes qw(GetBorrowerAttributes); |
|
|
29 |
use C4::Accounts; |
28 |
use C4::Accounts; |
30 |
use C4::Koha; |
29 |
use C4::Koha; |
31 |
|
30 |
|
Lines 180-187
if ( $total_paid and $total_paid ne '0.00' ) {
Link Here
|
180 |
$total_paid = '0.00'; #TODO not right with pay_individual |
179 |
$total_paid = '0.00'; #TODO not right with pay_individual |
181 |
} |
180 |
} |
182 |
|
181 |
|
183 |
borrower_add_additional_fields($patron, $template); |
|
|
184 |
|
185 |
$template->param(%$borrower); |
182 |
$template->param(%$borrower); |
186 |
|
183 |
|
187 |
if ( $input->param('error_over') ) { |
184 |
if ( $input->param('error_over') ) { |
Lines 193-216
$template->param(
Link Here
|
193 |
borrowernumber => $borrowernumber, # some templates require global |
190 |
borrowernumber => $borrowernumber, # some templates require global |
194 |
patron => $patron, |
191 |
patron => $patron, |
195 |
total => $total_due, |
192 |
total => $total_due, |
196 |
ExtendedPatronAttributes => C4::Context->preference('ExtendedPatronAttributes'), |
|
|
197 |
|
193 |
|
198 |
csrf_token => Koha::Token->new->generate_csrf({ session_id => scalar $input->cookie('CGISESSID') }), |
194 |
csrf_token => Koha::Token->new->generate_csrf({ session_id => scalar $input->cookie('CGISESSID') }), |
199 |
); |
195 |
); |
200 |
|
196 |
|
201 |
output_html_with_http_headers $input, $cookie, $template->output; |
197 |
output_html_with_http_headers $input, $cookie, $template->output; |
202 |
|
|
|
203 |
sub borrower_add_additional_fields { |
204 |
my ( $patron, $template ) = @_; |
205 |
|
206 |
# some borrower info is not returned in the standard call despite being assumed |
207 |
# in a number of templates. It should not be the business of this script but in lieu of |
208 |
# a revised api here it is ... |
209 |
|
210 |
if (C4::Context->preference('ExtendedPatronAttributes')) { |
211 |
my $extendedattributes = GetBorrowerAttributes($patron->borrowernumber); |
212 |
$template->param( extendedattributes => $extendedattributes ); |
213 |
} |
214 |
|
215 |
return; |
216 |
} |