[26/30] Updating kohastructure.sql to reflect changes introduced in Patron Card Creat...
[koha_fer] / members / update-child.pl
index 4788a07..4d2d80c 100755 (executable)
@@ -57,7 +57,9 @@ my $op             = $input->param('op');
 
 if ( $op eq 'multi' ) {
     my ( $catcodes, $labels ) =
-      GetborCatFromCatType( 'C', 'WHERE category_type <> ?' );
+               # FIXME - what are the possible upgrade paths?  C -> A , C -> S ...
+               #   currently just allowing C -> A because of limitation of API.
+      GetborCatFromCatType( 'A', 'WHERE category_type = ?' );
     my @rows;
     foreach my $k ( keys %$labels ) {
         my $row;
@@ -69,6 +71,7 @@ if ( $op eq 'multi' ) {
     }
     $template->param(
         MULTI          => 1,
+        CATCODE_MULTI          => 1,
         borrowernumber => $borrowernumber,
         CAT_LOOP       => \@rows,
     );
@@ -76,7 +79,7 @@ if ( $op eq 'multi' ) {
 }
 
 elsif ( $op eq 'update' ) {
-    my $member = GetMember($borrowernumber);
+    my $member = GetMember('borrowernumber'=>$borrowernumber);
     $member->{'guarantorid'}  = '0';
     $member->{'categorycode'} = $catcode;
     my $borcat = GetBorrowercategory($catcode);