Scripts missing check for Child category type would not correctly show 'update child...
[koha_fer] / members / pay.pl
index f9bdd14..e0de50a 100755 (executable)
@@ -131,9 +131,7 @@ if ( $check == 0 ) {
           };
     }
        
-my $borrowercategory = GetBorrowercategory( $data->{'categorycode'} );
-my $category_type = $borrowercategory->{'category_type'};
-( $template->param( adultborrower => 1 ) ) if ( $category_type eq 'A' );
+$template->param( adultborrower => 1 ) if ( $data->{'category_type'} eq 'A' );
 my ($picture, $dberror) = GetPatronImage($data->{'cardnumber'});
 $template->param( picture => 1 ) if $picture;
        
@@ -153,6 +151,7 @@ $template->param( picture => 1 ) if $picture;
                phone => $data->{'phone'},
                email => $data->{'email'},
            branchcode => $data->{'branchcode'},
+               is_child        => ($data->{'category_type'} eq 'C'),
         total          => sprintf( "%.2f", $total )
     );
     output_html_with_http_headers $input, $cookie, $template->output;