Added modifications required to the systempreferences table by the new
[koha.git] / newmember.pl
index 3c4092d..d600f32 100755 (executable)
@@ -149,25 +149,33 @@ if ($ok == 0) {
        push(@inputsloop, \%line);
     }
 
+    #Get the fee
+    my $dbh = C4::Context->dbh;
+    my $sth = $dbh->prepare("SELECT enrolmentfee FROM categories WHERE categorycode = ?");
+    $sth->execute($data{'categorycode'});
+    my ($fee) = $sth->fetchrow;
+    $sth->finish;
+
     $template->param(name => $name,
                     bornum => $data{'borrowernumber'},
                     cardnum => $data{'cardnumber'},
                     memcat => $data{'categorycode'},
-                    area => $data{'area'},
-                    fee => $data{'fee'},
+                    fee => $fee,
                     joindate => format_date($data{'joining'}),
                     expdate => format_date($data{'expiry'}),
-                    joinbranch => $data{'joinbranch'},
+                    branchcode => $data{'branchcode'},
                     ethnic => $ethnic,
                     dob => format_date($data{'dateofbirth'}),
                     sex => $sex,
                     postal => $postal,
                     home => $home,
+                       zipcode => $data{'zipcode'},
+                       homezipcode => $data{'homezipcode'},
                     phone => $data{'phone'},
                     phoneday => $data{'phoneday'},
                     faxnumber => $data{'faxnumber'},
                     emailaddress => $data{'emailaddress'},
-                     textmessaging => $data{'textmessaging'},
+                       textmessaging => $data{'textmessaging'},
                     contactname => $data{'contactname'},
                     altphone => $data{'altphone'},
                     altrelationship => $data{'altrelationship'},