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

Return to bug 21008