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

(-)a/members/boraccount.pl (-1 / +1 lines)
Lines 65-71 if ( $action eq 'reverse' ) { Link Here
65
  ReversePayment( scalar $input->param('accountlines_id') );
65
  ReversePayment( scalar $input->param('accountlines_id') );
66
}
66
}
67
67
68
if ( $patron->category->category_type eq 'C') {
68
if ( $patron->is_child ) {
69
    my $patron_categories = Koha::Patron::Categories->search_limited({ category_type => 'A' }, {order_by => ['categorycode']});
69
    my $patron_categories = Koha::Patron::Categories->search_limited({ category_type => 'A' }, {order_by => ['categorycode']});
70
    $template->param( 'CATCODE_MULTI' => 1) if $patron_categories->count > 1;
70
    $template->param( 'CATCODE_MULTI' => 1) if $patron_categories->count > 1;
71
    $template->param( 'catcode' => $patron_categories->next->categorycode )  if $patron_categories->count == 1;
71
    $template->param( 'catcode' => $patron_categories->next->categorycode )  if $patron_categories->count == 1;
(-)a/members/mancredit.pl (-1 / +1 lines)
Lines 80-86 if ($add){ Link Here
80
    );
80
    );
81
    my $logged_in_user = Koha::Patrons->find( $loggedinuser ) or die "Not logged in";
81
    my $logged_in_user = Koha::Patrons->find( $loggedinuser ) or die "Not logged in";
82
    output_and_exit_if_error( $input, $cookie, $template, { module => 'members', logged_in_user => $logged_in_user, current_patron => $patron } );
82
    output_and_exit_if_error( $input, $cookie, $template, { module => 'members', logged_in_user => $logged_in_user, current_patron => $patron } );
83
    if ( $patron->category->category_type eq 'C') {
83
    if ( $patron->is_child ) {
84
        my $patron_categories = Koha::Patron::Categories->search_limited({ category_type => 'A' }, {order_by => ['categorycode']});
84
        my $patron_categories = Koha::Patron::Categories->search_limited({ category_type => 'A' }, {order_by => ['categorycode']});
85
        $template->param( 'CATCODE_MULTI' => 1) if $patron_categories->count > 1;
85
        $template->param( 'CATCODE_MULTI' => 1) if $patron_categories->count > 1;
86
        $template->param( 'catcode' => $patron_categories->next->categorycode )  if $patron_categories->count == 1;
86
        $template->param( 'catcode' => $patron_categories->next->categorycode )  if $patron_categories->count == 1;
(-)a/members/maninvoice.pl (-1 / +1 lines)
Lines 108-114 if ($add){ Link Here
108
  }
108
  }
109
  $template->param( invoice_types_loop => \@invoice_types );
109
  $template->param( invoice_types_loop => \@invoice_types );
110
110
111
    if ( $patron->category->category_type eq 'C') {
111
    if ( $patron->is_child ) {
112
        my $patron_categories = Koha::Patron::Categories->search_limited({ category_type => 'A' }, {order_by => ['categorycode']});
112
        my $patron_categories = Koha::Patron::Categories->search_limited({ category_type => 'A' }, {order_by => ['categorycode']});
113
        $template->param( 'CATCODE_MULTI' => 1) if $patron_categories->count > 1;
113
        $template->param( 'CATCODE_MULTI' => 1) if $patron_categories->count > 1;
114
        $template->param( 'catcode' => $patron_categories->next->categorycode )  if $patron_categories->count == 1;
114
        $template->param( 'catcode' => $patron_categories->next->categorycode )  if $patron_categories->count == 1;
(-)a/members/member-flags.pl (-1 / +1 lines)
Lines 182-188 if ($input->param('newflags')) { Link Here
182
        push @loop, \%row;
182
        push @loop, \%row;
183
    }
183
    }
184
184
185
    if ( $category_type eq 'C') {
185
    if ( $patron->is_child ) {
186
        my $patron_categories = Koha::Patron::Categories->search_limited({ category_type => 'A' }, {order_by => ['categorycode']});
186
        my $patron_categories = Koha::Patron::Categories->search_limited({ category_type => 'A' }, {order_by => ['categorycode']});
187
        $template->param( 'CATCODE_MULTI' => 1) if $patron_categories->count > 1;
187
        $template->param( 'CATCODE_MULTI' => 1) if $patron_categories->count > 1;
188
        $template->param( 'catcode' => $patron_categories->next->categorycode )  if $patron_categories->count == 1;
188
        $template->param( 'catcode' => $patron_categories->next->categorycode )  if $patron_categories->count == 1;
(-)a/members/member-password.pl (-1 / +1 lines)
Lines 96-102 if ( $newpassword and not @errors) { Link Here
96
    }
96
    }
97
}
97
}
98
98
99
if ( $category_type eq 'C') {
99
if ( $patron->is_child ) {
100
    my $patron_categories = Koha::Patron::Categories->search_limited({ category_type => 'A' }, {order_by => ['categorycode']});
100
    my $patron_categories = Koha::Patron::Categories->search_limited({ category_type => 'A' }, {order_by => ['categorycode']});
101
    $template->param( 'CATCODE_MULTI' => 1) if $patron_categories->count > 1;
101
    $template->param( 'CATCODE_MULTI' => 1) if $patron_categories->count > 1;
102
    $template->param( 'catcode' => $patron_categories->next->categorycode )  if $patron_categories->count == 1;
102
    $template->param( 'catcode' => $patron_categories->next->categorycode )  if $patron_categories->count == 1;
(-)a/members/moremember.pl (-1 / +1 lines)
Lines 167-173 if ( $patron->is_debarred ) { Link Here
167
167
168
$data->{ "sex_".$data->{'sex'}."_p" } = 1 if defined $data->{sex};
168
$data->{ "sex_".$data->{'sex'}."_p" } = 1 if defined $data->{sex};
169
169
170
if ( $category_type eq 'C') {
170
if ( $patron->is_child ) {
171
    my $patron_categories = Koha::Patron::Categories->search_limited({ category_type => 'A' }, {order_by => ['categorycode']});
171
    my $patron_categories = Koha::Patron::Categories->search_limited({ category_type => 'A' }, {order_by => ['categorycode']});
172
    $template->param( 'CATCODE_MULTI' => 1) if $patron_categories->count > 1;
172
    $template->param( 'CATCODE_MULTI' => 1) if $patron_categories->count > 1;
173
    $template->param( 'catcode' => $patron_categories->next->categorycode )  if $patron_categories->count == 1;
173
    $template->param( 'catcode' => $patron_categories->next->categorycode )  if $patron_categories->count == 1;
(-)a/members/printfeercpt.pl (-3 / +1 lines)
Lines 54-66 my $logged_in_user = Koha::Patrons->find( $loggedinuser ) or die "Not logged in" Link Here
54
my $patron         = Koha::Patrons->find( $borrowernumber );
54
my $patron         = Koha::Patrons->find( $borrowernumber );
55
output_and_exit_if_error( $input, $cookie, $template, { module => 'members', logged_in_user => $logged_in_user, current_patron => $patron } );
55
output_and_exit_if_error( $input, $cookie, $template, { module => 'members', logged_in_user => $logged_in_user, current_patron => $patron } );
56
56
57
my $category = $patron->category;
58
59
if ( $action eq 'print' ) {
57
if ( $action eq 'print' ) {
60
#  ReversePayment( $borrowernumber, $input->param('accountno') );
58
#  ReversePayment( $borrowernumber, $input->param('accountno') );
61
}
59
}
62
60
63
if ( $category->category_type eq 'C') {
61
if ( $patron->is_child ) {
64
    my $patron_categories = Koha::Patron::Categories->search_limited({ category_type => 'A' }, {order_by => ['categorycode']});
62
    my $patron_categories = Koha::Patron::Categories->search_limited({ category_type => 'A' }, {order_by => ['categorycode']});
65
    $template->param( 'CATCODE_MULTI' => 1) if $patron_categories->count > 1;
63
    $template->param( 'CATCODE_MULTI' => 1) if $patron_categories->count > 1;
66
    $template->param( 'catcode' => $patron_categories->next->categorycde )  if $patron_categories->count == 1;
64
    $template->param( 'catcode' => $patron_categories->next->categorycde )  if $patron_categories->count == 1;
(-)a/members/printinvoice.pl (-3 / +1 lines)
Lines 53-61 my $logged_in_user = Koha::Patrons->find( $loggedinuser ) or die "Not logged in" Link Here
53
my $patron         = Koha::Patrons->find( $borrowernumber );
53
my $patron         = Koha::Patrons->find( $borrowernumber );
54
output_and_exit_if_error( $input, $cookie, $template, { module => 'members', logged_in_user => $logged_in_user, current_patron => $patron } );
54
output_and_exit_if_error( $input, $cookie, $template, { module => 'members', logged_in_user => $logged_in_user, current_patron => $patron } );
55
55
56
my $category = $patron->category;
56
if ( $patron->is_child ) {
57
58
if ( $category->category_type eq 'C' ) {
59
    my $patron_categories = Koha::Patron::Categories->search_limited({ category_type => 'A' }, {order_by => ['categorycode']});
57
    my $patron_categories = Koha::Patron::Categories->search_limited({ category_type => 'A' }, {order_by => ['categorycode']});
60
    $template->param( 'CATCODE_MULTI' => 1) if $patron_categories->count > 1;
58
    $template->param( 'CATCODE_MULTI' => 1) if $patron_categories->count > 1;
61
    $template->param( 'catcode' => $patron_categories->next->categorycode )  if $patron_categories->count == 1;
59
    $template->param( 'catcode' => $patron_categories->next->categorycode )  if $patron_categories->count == 1;
(-)a/members/readingrec.pl (-2 / +1 lines)
Lines 93-100 if ( $op eq 'export_barcodes' ) { Link Here
93
    }
93
    }
94
}
94
}
95
95
96
my $category = $patron->category;
96
if ( $patron->is_child ) {
97
if ( $category->category_type eq 'C') {
98
    my $patron_categories = Koha::Patron::Categories->search_limited({ category_type => 'A' }, {order_by => ['categorycode']});
97
    my $patron_categories = Koha::Patron::Categories->search_limited({ category_type => 'A' }, {order_by => ['categorycode']});
99
    $template->param( 'CATCODE_MULTI' => 1) if $patron_categories->count > 1;
98
    $template->param( 'CATCODE_MULTI' => 1) if $patron_categories->count > 1;
100
    $template->param( 'catcode' => $patron_categories->next->categorycode )  if $patron_categories->count == 1;
99
    $template->param( 'catcode' => $patron_categories->next->categorycode )  if $patron_categories->count == 1;
(-)a/members/routing-lists.pl (-3 lines)
Lines 52-59 my $logged_in_user = Koha::Patrons->find( $loggedinuser ) or die "Not logged in" Link Here
52
my $patron         = Koha::Patrons->find( $borrowernumber );
52
my $patron         = Koha::Patrons->find( $borrowernumber );
53
output_and_exit_if_error( $query, $cookie, $template, { module => 'members', logged_in_user => $logged_in_user, current_patron => $patron } );
53
output_and_exit_if_error( $query, $cookie, $template, { module => 'members', logged_in_user => $logged_in_user, current_patron => $patron } );
54
54
55
my $category = $patron->category;
56
57
my $count;
55
my $count;
58
my @borrowerSubscriptions;
56
my @borrowerSubscriptions;
59
($count, @borrowerSubscriptions) = GetSubscriptionsFromBorrower($borrowernumber );
57
($count, @borrowerSubscriptions) = GetSubscriptionsFromBorrower($borrowernumber );
60
- 

Return to bug 18789