BugFixing adding informations branch to child creation.

This commit is contained in:
hdl 2006-09-12 13:25:51 +00:00
parent cbf815012b
commit 8f9d08c91e
3 changed files with 9 additions and 6 deletions

View File

@ -2,9 +2,9 @@
<div id="mainbloc">
<h1>Add New Junior Member </h1><br>
<form action="/cgi-bin/koha/members/newjmember.pl" method="post">
<!--<input type="hidden" name="joining" value="">
<input type="hidden" name="expiry" value="">
<input type="hidden" name="type" value="borrowers">-->
<input type="hidden" name="branchcode" value="<!-- TMPL_VAR NAME="branchcode" -->">
<input type="hidden" name="expiry" value="<!-- TMPL_VAR NAME="expiry" -->">
<input type="hidden" name="expiry" value="<!-- TMPL_VAR NAME="zipcode" -->">
<input type="hidden" name="borrowernumber" value="<!-- TMPL_VAR NAME="member" -->">
<input type="hidden" name="updtype" value="I">
<input type="hidden" name="area" value="<!-- TMPL_VAR NAME="area" -->">

View File

@ -48,7 +48,7 @@ for (my $i=0;$i<1;$i++){
my $sth=$dbh->prepare("Select * from borrowers where borrowernumber=?");
$sth->execute($data{'bornumber_child_$i'});
if (my $data=$sth->fetchrow_hashref){
$query="update borrowers set title='$data{'title'}',expiry='$data{'expiry'}',
$query="update borrowers set title='$data{'title'}',branchcode='$data{'branchcode'}',expiry='$data{'expiry'}',
cardnumber='$data{'cardnumber'}',sex='$data{'sex'}',ethnotes='$data{'ethnicnotes'}',
streetaddress='$data{'address'}',faxnumber='$data{'faxnumber'}',firstname='$data{'firstname'}',
altnotes='$data{'altnotes'}',dateofbirth='$data{'dateofbirth'}',contactname='$data{'contactname'}',
@ -79,7 +79,7 @@ for (my $i=0;$i<1;$i++){
$query="insert into borrowers (title,expiry,cardnumber,sex,ethnotes,streetaddress,faxnumber,
firstname,altnotes,dateofbirth,contactname,emailaddress,dateenrolled,streetcity,
altrelationship,othernames,phoneday,categorycode,city,area,phone,borrowernotes,altphone,surname,
initials,ethnicity,borrowernumber,guarantor,school,physstreet,sort1,sort2)
initials,ethnicity,borrowernumber,guarantor,school,physstreet,sort1,sort2, branchcode)
values ('','$data{'expiry'}',
'$cardnumber',
'$sex','$data{'ethnotes'}','$data{'address'}','$data{'faxnumber'}',
@ -87,7 +87,7 @@ for (my $i=0;$i<1;$i++){
'$data{'joining'}','$data{'streetcity'}','$data{'altrelationship'}','$data{'othernames'}',
'$data{'phoneday'}','C','$data{'city'}','$data{'area'}','$data{'phone'}',
'$notes','$data{'altphone'}','$surname','$data{'initials'}',
'$data{'ethnicity'}','$bornum','$guarant','$school','$data{'physstreet'}','$data{'sort1'}','$data{'sort2'}')";
'$data{'ethnicity'}','$bornum','$guarant','$school','$data{'physstreet'}','$data{'sort1'}','$data{'sort2'}','$data{'branchcode'}')";
}
#print $query;

View File

@ -93,6 +93,9 @@ $template->param( member => $member,
emailaddress => $data->{'emailaddress'},
contactname => $data->{'contactname'},
altphone => $data->{'altphone'},
branchcode => $data->{'branchcode'},
expiry => $data->{'expiry'},
zipcode => $data->{'zipcode'},
dateformat => display_date_format(),
titleloop => \@titledata,
cmemloop => \@cmemdata,