View | Details | Raw Unified | Return to bug 21008
Collapse All | Expand All

(-)a/members/pay.pl (-1 / +1 lines)
Lines 234-240 sub borrower_add_additional_fields { Link Here
234
# some borrower info is not returned in the standard call despite being assumed
234
# some borrower info is not returned in the standard call despite being assumed
235
# in a number of templates. It should not be the business of this script but in lieu of
235
# in a number of templates. It should not be the business of this script but in lieu of
236
# a revised api here it is ...
236
# a revised api here it is ...
237
    if ( $patron->category->category_type eq 'C' ) {
237
    if ( $patron->is_child ) {
238
        my $patron_categories = Koha::Patron::Categories->search_limited({ category_type => 'A' }, {order_by => ['categorycode']});
238
        my $patron_categories = Koha::Patron::Categories->search_limited({ category_type => 'A' }, {order_by => ['categorycode']});
239
        $template->param( 'CATCODE_MULTI' => 1) if $patron_categories->count > 1;
239
        $template->param( 'CATCODE_MULTI' => 1) if $patron_categories->count > 1;
240
        $template->param( 'catcode' => $patron_categories->next->categorycode )  if $patron_categories->count == 1;
240
        $template->param( 'catcode' => $patron_categories->next->categorycode )  if $patron_categories->count == 1;
(-)a/members/paycollect.pl (-5 / +4 lines)
Lines 180-186 if ( $total_paid and $total_paid ne '0.00' ) { Link Here
180
    $total_paid = '0.00';    #TODO not right with pay_individual
180
    $total_paid = '0.00';    #TODO not right with pay_individual
181
}
181
}
182
182
183
borrower_add_additional_fields($borrower, $template, $category);
183
borrower_add_additional_fields($patron, $template);
184
184
185
$template->param(%$borrower);
185
$template->param(%$borrower);
186
186
Lines 201-219 $template->param( Link Here
201
output_html_with_http_headers $input, $cookie, $template->output;
201
output_html_with_http_headers $input, $cookie, $template->output;
202
202
203
sub borrower_add_additional_fields {
203
sub borrower_add_additional_fields {
204
    my ( $b_ref, $template, $category ) = @_;
204
    my ( $patron, $template ) = @_;
205
205
206
# some borrower info is not returned in the standard call despite being assumed
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
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 ...
208
# a revised api here it is ...
209
    if ( $category->category_type eq 'C' ) {
209
    if ( $patron->is_child ) {
210
        my $patron_categories = Koha::Patron::Categories->search_limited({ category_type => 'A' }, {order_by => ['categorycode']});
210
        my $patron_categories = Koha::Patron::Categories->search_limited({ category_type => 'A' }, {order_by => ['categorycode']});
211
        $template->param( 'CATCODE_MULTI' => 1) if $patron_categories->count > 1;
211
        $template->param( 'CATCODE_MULTI' => 1) if $patron_categories->count > 1;
212
        $template->param( 'catcode' => $patron_categories->next->categorycode )  if $patron_categories->count == 1;
212
        $template->param( 'catcode' => $patron_categories->next->categorycode )  if $patron_categories->count == 1;
213
    }
213
    }
214
214
215
    if (C4::Context->preference('ExtendedPatronAttributes')) {
215
    if (C4::Context->preference('ExtendedPatronAttributes')) {
216
        my $extendedattributes = GetBorrowerAttributes($b_ref->{borrowernumber});
216
        my $extendedattributes = GetBorrowerAttributes($patron->borrowernumber);
217
        $template->param( extendedattributes => $extendedattributes );
217
        $template->param( extendedattributes => $extendedattributes );
218
    }
218
    }
219
219
220
- 

Return to bug 21008