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

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

Return to bug 18789