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

(-)a/members/boraccount.pl (-1 / +1 lines)
Lines 61-67 if ( $action eq 'reverse' ) { Link Here
61
  ReversePayment( $input->param('accountlines_id') );
61
  ReversePayment( $input->param('accountlines_id') );
62
}
62
}
63
63
64
if ( $patron->category->category_type eq 'C') {
64
if ( $patron->is_child ) {
65
    my $patron_categories = Koha::Patron::Categories->search_limited({ category_type => 'A' }, {order_by => ['categorycode']});
65
    my $patron_categories = Koha::Patron::Categories->search_limited({ category_type => 'A' }, {order_by => ['categorycode']});
66
    $template->param( 'CATCODE_MULTI' => 1) if $patron_categories->count > 1;
66
    $template->param( 'CATCODE_MULTI' => 1) if $patron_categories->count > 1;
67
    $template->param( 'catcode' => $patron_categories->next )  if $patron_categories->count == 1;
67
    $template->param( 'catcode' => $patron_categories->next )  if $patron_categories->count == 1;
(-)a/members/mancredit.pl (-1 / +1 lines)
Lines 76-82 if ($add){ Link Here
76
    );
76
    );
77
    my $logged_in_user = Koha::Patrons->find( $loggedinuser ) or die "Not logged in";
77
    my $logged_in_user = Koha::Patrons->find( $loggedinuser ) or die "Not logged in";
78
    output_and_exit_if_error( $input, $cookie, $template, { module => 'members', logged_in_user => $logged_in_user, current_patron => $patron } );
78
    output_and_exit_if_error( $input, $cookie, $template, { module => 'members', logged_in_user => $logged_in_user, current_patron => $patron } );
79
    if ( $patron->category->category_type eq 'C') {
79
    if ( $patron->is_child ) {
80
        my $patron_categories = Koha::Patron::Categories->search_limited({ category_type => 'A' }, {order_by => ['categorycode']});
80
        my $patron_categories = Koha::Patron::Categories->search_limited({ category_type => 'A' }, {order_by => ['categorycode']});
81
        $template->param( 'CATCODE_MULTI' => 1) if $patron_categories->count > 1;
81
        $template->param( 'CATCODE_MULTI' => 1) if $patron_categories->count > 1;
82
        $template->param( 'catcode' => $patron_categories->next )  if $patron_categories->count == 1;
82
        $template->param( 'catcode' => $patron_categories->next )  if $patron_categories->count == 1;
(-)a/members/maninvoice.pl (-1 / +1 lines)
Lines 103-109 if ($add){ Link Here
103
  }
103
  }
104
  $template->param( invoice_types_loop => \@invoice_types );
104
  $template->param( invoice_types_loop => \@invoice_types );
105
105
106
    if ( $patron->category->category_type eq 'C') {
106
    if ( $patron->is_child ) {
107
        my $patron_categories = Koha::Patron::Categories->search_limited({ category_type => 'A' }, {order_by => ['categorycode']});
107
        my $patron_categories = Koha::Patron::Categories->search_limited({ category_type => 'A' }, {order_by => ['categorycode']});
108
        $template->param( 'CATCODE_MULTI' => 1) if $patron_categories->count > 1;
108
        $template->param( 'CATCODE_MULTI' => 1) if $patron_categories->count > 1;
109
        $template->param( 'catcode' => $patron_categories->next )  if $patron_categories->count == 1;
109
        $template->param( 'catcode' => $patron_categories->next )  if $patron_categories->count == 1;
(-)a/members/member-flags.pl (-1 / +1 lines)
Lines 177-183 if ($input->param('newflags')) { Link Here
177
	    push @loop, \%row;
177
	    push @loop, \%row;
178
    }
178
    }
179
179
180
    if ( $category_type eq 'C') {
180
    if ( $patron->is_child ) {
181
        my $patron_categories = Koha::Patron::Categories->search_limited({ category_type => 'A' }, {order_by => ['categorycode']});
181
        my $patron_categories = Koha::Patron::Categories->search_limited({ category_type => 'A' }, {order_by => ['categorycode']});
182
        $template->param( 'CATCODE_MULTI' => 1) if $patron_categories->count > 1;
182
        $template->param( 'CATCODE_MULTI' => 1) if $patron_categories->count > 1;
183
        $template->param( 'catcode' => $patron_categories->next )  if $patron_categories->count == 1;
183
        $template->param( 'catcode' => $patron_categories->next )  if $patron_categories->count == 1;
(-)a/members/member-password.pl (-1 / +1 lines)
Lines 101-107 else { Link Here
101
    $template->param( defaultnewpassword => $defaultnewpassword );
101
    $template->param( defaultnewpassword => $defaultnewpassword );
102
}
102
}
103
103
104
if ( $category_type eq 'C') {
104
if ( $patron->is_child ) {
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 )  if $patron_categories->count == 1;
(-)a/members/moremember.pl (-1 / +1 lines)
Lines 165-171 if ( $patron->is_debarred ) { Link Here
165
165
166
$data->{ "sex_".$data->{'sex'}."_p" } = 1 if defined $data->{sex};
166
$data->{ "sex_".$data->{'sex'}."_p" } = 1 if defined $data->{sex};
167
167
168
if ( $category_type eq 'C') {
168
if ( $patron->is_child ) {
169
    my $patron_categories = Koha::Patron::Categories->search_limited({ category_type => 'A' }, {order_by => ['categorycode']});
169
    my $patron_categories = Koha::Patron::Categories->search_limited({ category_type => 'A' }, {order_by => ['categorycode']});
170
    $template->param( 'CATCODE_MULTI' => 1) if $patron_categories->count > 1;
170
    $template->param( 'CATCODE_MULTI' => 1) if $patron_categories->count > 1;
171
    $template->param( 'catcode' => $patron_categories->next )  if $patron_categories->count == 1;
171
    $template->param( 'catcode' => $patron_categories->next )  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 )  if $patron_categories->count == 1;
64
    $template->param( 'catcode' => $patron_categories->next )  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 )  if $patron_categories->count == 1;
59
    $template->param( 'catcode' => $patron_categories->next )  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 )  if $patron_categories->count == 1;
99
    $template->param( 'catcode' => $patron_categories->next )  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