More changes to update-child process. Many scripts missing necessary data for checkin...
[koha.git] / members / maninvoice.pl
index 1744235..6e3f225 100755 (executable)
@@ -71,6 +71,13 @@ if ($add){
                                        flagsrequired => {borrowers => 1},
                                        debug => 1,
                                        });
+                                       
+    if ( $data->{'category_type'} eq 'C') {
+        my  ( $catcodes, $labels ) =  GetborCatFromCatType( 'A', 'WHERE category_type = ?' );
+        my $cnt = scalar(@$catcodes);
+        $template->param( 'CATCODE_MULTI' => 1) if $cnt > 1;
+        $template->param( 'catcode' =>    $catcodes->[0])  if $cnt == 1;
+    }
 
     $template->param( adultborrower => 1 ) if ( $data->{'category_type'} eq 'A' );
     my ($picture, $dberror) = GetPatronImage($data->{'cardnumber'});