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

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

Return to bug 21008