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

(-)a/circ/circulation.pl (-1 / +1 lines)
Lines 548-554 my ( $total, $accts, $numaccts) = GetMemberAccountRecords( $borrowernumber ); Link Here
548
if ( $patron && $patron->category->category_type eq 'C') {
548
if ( $patron && $patron->category->category_type eq 'C') {
549
    my $patron_categories = Koha::Patron::Categories->search_limited({ category_type => 'A' }, {order_by => ['categorycode']});
549
    my $patron_categories = Koha::Patron::Categories->search_limited({ category_type => 'A' }, {order_by => ['categorycode']});
550
    $template->param( 'CATCODE_MULTI' => 1) if $patron_categories->count > 1;
550
    $template->param( 'CATCODE_MULTI' => 1) if $patron_categories->count > 1;
551
    $template->param( 'catcode' => $patron_categories->next )  if $patron_categories->count == 1;
551
    $template->param( 'catcode' => $patron_categories->next->categorycode )  if $patron_categories->count == 1;
552
}
552
}
553
553
554
my $messages = Koha::Patron::Messages->search(
554
my $messages = Koha::Patron::Messages->search(
(-)a/members/boraccount.pl (-1 / +1 lines)
Lines 66-72 if ( $action eq 'reverse' ) { Link Here
66
if ( $patron->category->category_type eq 'C') {
66
if ( $patron->category->category_type eq 'C') {
67
    my $patron_categories = Koha::Patron::Categories->search_limited({ category_type => 'A' }, {order_by => ['categorycode']});
67
    my $patron_categories = Koha::Patron::Categories->search_limited({ category_type => 'A' }, {order_by => ['categorycode']});
68
    $template->param( 'CATCODE_MULTI' => 1) if $patron_categories->count > 1;
68
    $template->param( 'CATCODE_MULTI' => 1) if $patron_categories->count > 1;
69
    $template->param( 'catcode' => $patron_categories->next )  if $patron_categories->count == 1;
69
    $template->param( 'catcode' => $patron_categories->next->categorycode )  if $patron_categories->count == 1;
70
}
70
}
71
71
72
#get account details
72
#get account details
(-)a/members/holdshistory.pl (-1 / +1 lines)
Lines 77-83 if ( $borrowernumber eq C4::Context->preference('AnonymousPatron') ){ Link Here
77
if ( $patron->category->category_type eq 'C') {
77
if ( $patron->category->category_type eq 'C') {
78
    my $patron_categories = Koha::Patron::Categories->search_limited({ category_type => 'A' }, {order_by => ['categorycode']});
78
    my $patron_categories = Koha::Patron::Categories->search_limited({ category_type => 'A' }, {order_by => ['categorycode']});
79
    $template->param( 'CATCODE_MULTI' => 1) if $patron_categories->count > 1;
79
    $template->param( 'CATCODE_MULTI' => 1) if $patron_categories->count > 1;
80
    $template->param( 'catcode' => $patron_categories->next )  if $patron_categories->count == 1;
80
    $template->param( 'catcode' => $patron_categories->next->categorycode )  if $patron_categories->count == 1;
81
}
81
}
82
82
83
$template->param( adultborrower => 1 ) if ( $patron->category->category_type eq 'A' || $patron->category->category_type eq 'I' );
83
$template->param( adultborrower => 1 ) if ( $patron->category->category_type eq 'A' || $patron->category->category_type eq 'I' );
(-)a/members/mancredit.pl (-1 / +1 lines)
Lines 80-86 if ($add){ Link Here
80
    if ( $patron->category->category_type eq 'C') {
80
    if ( $patron->category->category_type eq 'C') {
81
        my $patron_categories = Koha::Patron::Categories->search_limited({ category_type => 'A' }, {order_by => ['categorycode']});
81
        my $patron_categories = Koha::Patron::Categories->search_limited({ category_type => 'A' }, {order_by => ['categorycode']});
82
        $template->param( 'CATCODE_MULTI' => 1) if $patron_categories->count > 1;
82
        $template->param( 'CATCODE_MULTI' => 1) if $patron_categories->count > 1;
83
        $template->param( 'catcode' => $patron_categories->next )  if $patron_categories->count == 1;
83
        $template->param( 'catcode' => $patron_categories->next->categorycode )  if $patron_categories->count == 1;
84
    }
84
    }
85
85
86
    $template->param( adultborrower => 1 ) if ( $patron->category->category_type =~ /^(A|I)$/ );
86
    $template->param( adultborrower => 1 ) if ( $patron->category->category_type =~ /^(A|I)$/ );
(-)a/members/maninvoice.pl (-1 / +1 lines)
Lines 107-113 if ($add){ Link Here
107
    if ( $patron->category->category_type eq 'C') {
107
    if ( $patron->category->category_type eq 'C') {
108
        my $patron_categories = Koha::Patron::Categories->search_limited({ category_type => 'A' }, {order_by => ['categorycode']});
108
        my $patron_categories = Koha::Patron::Categories->search_limited({ category_type => 'A' }, {order_by => ['categorycode']});
109
        $template->param( 'CATCODE_MULTI' => 1) if $patron_categories->count > 1;
109
        $template->param( 'CATCODE_MULTI' => 1) if $patron_categories->count > 1;
110
        $template->param( 'catcode' => $patron_categories->next )  if $patron_categories->count == 1;
110
        $template->param( 'catcode' => $patron_categories->next->categorycode )  if $patron_categories->count == 1;
111
    }
111
    }
112
112
113
    $template->param( adultborrower => 1 ) if ( $patron->category->category_type =~ /^(A|I)$/ );
113
    $template->param( adultborrower => 1 ) if ( $patron->category->category_type =~ /^(A|I)$/ );
(-)a/members/member-flags.pl (-1 / +1 lines)
Lines 181-187 if ($input->param('newflags')) { Link Here
181
    if ( $category_type eq 'C') {
181
    if ( $category_type eq 'C') {
182
        my $patron_categories = Koha::Patron::Categories->search_limited({ category_type => 'A' }, {order_by => ['categorycode']});
182
        my $patron_categories = Koha::Patron::Categories->search_limited({ category_type => 'A' }, {order_by => ['categorycode']});
183
        $template->param( 'CATCODE_MULTI' => 1) if $patron_categories->count > 1;
183
        $template->param( 'CATCODE_MULTI' => 1) if $patron_categories->count > 1;
184
        $template->param( 'catcode' => $patron_categories->next )  if $patron_categories->count == 1;
184
        $template->param( 'catcode' => $patron_categories->next->categorycode )  if $patron_categories->count == 1;
185
    }
185
    }
186
186
187
$template->param( adultborrower => 1 ) if ( $category_type =~ /^(A|I)$/ );
187
$template->param( adultborrower => 1 ) if ( $category_type =~ /^(A|I)$/ );
(-)a/members/member-password.pl (-1 / +1 lines)
Lines 104-110 if ( $newpassword and not @errors) { Link Here
104
if ( $category_type eq 'C') {
104
if ( $category_type eq 'C') {
105
    my $patron_categories = Koha::Patron::Categories->search_limited({ category_type => 'A' }, {order_by => ['categorycode']});
105
    my $patron_categories = Koha::Patron::Categories->search_limited({ category_type => 'A' }, {order_by => ['categorycode']});
106
    $template->param( 'CATCODE_MULTI' => 1) if $patron_categories->count > 1;
106
    $template->param( 'CATCODE_MULTI' => 1) if $patron_categories->count > 1;
107
    $template->param( 'catcode' => $patron_categories->next )  if $patron_categories->count == 1;
107
    $template->param( 'catcode' => $patron_categories->next->categorycode )  if $patron_categories->count == 1;
108
}
108
}
109
109
110
$template->param( adultborrower => 1 ) if ( $category_type =~ /^(A|I)$/ );
110
$template->param( adultborrower => 1 ) if ( $category_type =~ /^(A|I)$/ );
(-)a/members/moremember.pl (-1 / +1 lines)
Lines 172-178 $data->{ "sex_".$data->{'sex'}."_p" } = 1 if defined $data->{sex}; Link Here
172
if ( $category_type eq 'C') {
172
if ( $category_type eq 'C') {
173
    my $patron_categories = Koha::Patron::Categories->search_limited({ category_type => 'A' }, {order_by => ['categorycode']});
173
    my $patron_categories = Koha::Patron::Categories->search_limited({ category_type => 'A' }, {order_by => ['categorycode']});
174
    $template->param( 'CATCODE_MULTI' => 1) if $patron_categories->count > 1;
174
    $template->param( 'CATCODE_MULTI' => 1) if $patron_categories->count > 1;
175
    $template->param( 'catcode' => $patron_categories->next )  if $patron_categories->count == 1;
175
    $template->param( 'catcode' => $patron_categories->next->categorycode )  if $patron_categories->count == 1;
176
}
176
}
177
177
178
my @relatives;
178
my @relatives;
(-)a/members/pay.pl (-1 / +1 lines)
Lines 235-241 sub borrower_add_additional_fields { Link Here
235
    if ( $b_ref->{category_type} eq 'C' ) {
235
    if ( $b_ref->{category_type} eq 'C' ) {
236
        my $patron_categories = Koha::Patron::Categories->search_limited({ category_type => 'A' }, {order_by => ['categorycode']});
236
        my $patron_categories = Koha::Patron::Categories->search_limited({ category_type => 'A' }, {order_by => ['categorycode']});
237
        $template->param( 'CATCODE_MULTI' => 1) if $patron_categories->count > 1;
237
        $template->param( 'CATCODE_MULTI' => 1) if $patron_categories->count > 1;
238
        $template->param( 'catcode' => $patron_categories->next )  if $patron_categories->count == 1;
238
        $template->param( 'catcode' => $patron_categories->next->categorycode )  if $patron_categories->count == 1;
239
    } elsif ( $b_ref->{category_type} eq 'A' || $b_ref->{category_type} eq 'I' ) {
239
    } elsif ( $b_ref->{category_type} eq 'A' || $b_ref->{category_type} eq 'I' ) {
240
        $b_ref->{adultborrower} = 1;
240
        $b_ref->{adultborrower} = 1;
241
    }
241
    }
(-)a/members/paycollect.pl (-1 / +1 lines)
Lines 200-206 sub borrower_add_additional_fields { Link Here
200
    if ( $b_ref->{category_type} eq 'C' ) {
200
    if ( $b_ref->{category_type} eq 'C' ) {
201
        my $patron_categories = Koha::Patron::Categories->search_limited({ category_type => 'A' }, {order_by => ['categorycode']});
201
        my $patron_categories = Koha::Patron::Categories->search_limited({ category_type => 'A' }, {order_by => ['categorycode']});
202
        $template->param( 'CATCODE_MULTI' => 1) if $patron_categories->count > 1;
202
        $template->param( 'CATCODE_MULTI' => 1) if $patron_categories->count > 1;
203
        $template->param( 'catcode' => $patron_categories->next )  if $patron_categories->count == 1;
203
        $template->param( 'catcode' => $patron_categories->next->categorycode )  if $patron_categories->count == 1;
204
    } elsif ( $b_ref->{category_type} eq 'A' || $b_ref->{category_type} eq 'I' ) {
204
    } elsif ( $b_ref->{category_type} eq 'A' || $b_ref->{category_type} eq 'I' ) {
205
        $b_ref->{adultborrower} = 1;
205
        $b_ref->{adultborrower} = 1;
206
    }
206
    }
(-)a/members/printfeercpt.pl (-1 / +1 lines)
Lines 67-73 if ( $action eq 'print' ) { Link Here
67
if ( $data->{'category_type'} eq 'C') {
67
if ( $data->{'category_type'} eq 'C') {
68
    my $patron_categories = Koha::Patron::Categories->search_limited({ category_type => 'A' }, {order_by => ['categorycode']});
68
    my $patron_categories = Koha::Patron::Categories->search_limited({ category_type => 'A' }, {order_by => ['categorycode']});
69
    $template->param( 'CATCODE_MULTI' => 1) if $patron_categories->count > 1;
69
    $template->param( 'CATCODE_MULTI' => 1) if $patron_categories->count > 1;
70
    $template->param( 'catcode' => $patron_categories->next )  if $patron_categories->count == 1;
70
    $template->param( 'catcode' => $patron_categories->next->categorycde )  if $patron_categories->count == 1;
71
}
71
}
72
72
73
#get account details
73
#get account details
(-)a/members/printinvoice.pl (-1 / +1 lines)
Lines 62-68 $data->{category_type} = $category->category_type; Link Here
62
if ( $data->{'category_type'} eq 'C' ) {
62
if ( $data->{'category_type'} eq 'C' ) {
63
    my $patron_categories = Koha::Patron::Categories->search_limited({ category_type => 'A' }, {order_by => ['categorycode']});
63
    my $patron_categories = Koha::Patron::Categories->search_limited({ category_type => 'A' }, {order_by => ['categorycode']});
64
    $template->param( 'CATCODE_MULTI' => 1) if $patron_categories->count > 1;
64
    $template->param( 'CATCODE_MULTI' => 1) if $patron_categories->count > 1;
65
    $template->param( 'catcode' => $patron_categories->next )  if $patron_categories->count == 1;
65
    $template->param( 'catcode' => $patron_categories->next->categorycode )  if $patron_categories->count == 1;
66
}
66
}
67
67
68
#get account details
68
#get account details
(-)a/members/readingrec.pl (-2 / +1 lines)
Lines 104-110 if ( $op eq 'export_barcodes' ) { Link Here
104
if ( $data->{'category_type'} eq 'C') {
104
if ( $data->{'category_type'} eq 'C') {
105
    my $patron_categories = Koha::Patron::Categories->search_limited({ category_type => 'A' }, {order_by => ['categorycode']});
105
    my $patron_categories = Koha::Patron::Categories->search_limited({ category_type => 'A' }, {order_by => ['categorycode']});
106
    $template->param( 'CATCODE_MULTI' => 1) if $patron_categories->count > 1;
106
    $template->param( 'CATCODE_MULTI' => 1) if $patron_categories->count > 1;
107
    $template->param( 'catcode' => $patron_categories->next )  if $patron_categories->count == 1;
107
    $template->param( 'catcode' => $patron_categories->next->categorycode )  if $patron_categories->count == 1;
108
}
108
}
109
109
110
$template->param( adultborrower => 1 ) if ( $data->{'category_type'} eq 'A' || $data->{'category_type'} eq 'I' );
110
$template->param( adultborrower => 1 ) if ( $data->{'category_type'} eq 'A' || $data->{'category_type'} eq 'I' );
111
- 

Return to bug 19921