From 43901996963d589d1f61b194708734c6bf4aaa9d Mon Sep 17 00:00:00 2001 From: tipaul Date: Mon, 22 Dec 2003 14:56:35 +0000 Subject: [PATCH] fix for #671 (add institution member) note member management code is really dirty & can be factorised, will be done in HEAD branch (2.1.x version) --- insertidata.pl | 58 ++++--- .../intranet-tmpl/default/en/newimember.tmpl | 161 ++++++++++++++++++ 2 files changed, 198 insertions(+), 21 deletions(-) diff --git a/insertidata.pl b/insertidata.pl index e5b6c43e8f..771331e59d 100755 --- a/insertidata.pl +++ b/insertidata.pl @@ -60,29 +60,45 @@ if (my $data2=$sth->fetchrow_hashref){ textmessaging=?, branchcode = ?, zipcode = ?,homezipcode=? where borrowernumber=?"); - $sth2->execute($data{'title'},$data{'expiry'},$data{'cardnumber_institution'},$data{'sex'},$data{'ethnicnotes'},$data{'address'},$data{'faxnumber'},$data{'firstname'},$data{'altnotes'},$data{'dateofbirth'},$data{'contactname'},$data{'emailaddress'},$data{'joining'},$data{'streetcity'},$data{'altrelationship'},$data{'othernames'},$data{'phoneday'},$data{'city'},$data{'area'},$data{'phone'},$data{'borrowernotes'},$data{'altphone'},$data{'institution_name'},$data{'initials'},$data{'streetaddress'},$data{'ethnicity'},$data{'gna'},$data{'lost'},$data{'debarred'},$data{'textmessaging'},$data{'branchcode'},$data{'zipcode'},$data{'homezipcode'},$data{'borrowernumber'}); + $sth2->execute($data{'title'},$data{'expiry'}, + $data{'cardnumber_institution'},$data{'sex'},$data{'ethnicnotes'}, + $data{'address'},$data{'faxnumber'},$data{'firstname'}, + $data{'altnotes'},$data{'dateofbirth'},$data{'contactname'}, + $data{'emailaddress'},$data{'joining'},$data{'streetcity'}, + $data{'altrelationship'},$data{'othernames'},$data{'phoneday'}, + $data{'city'},$data{'area'},$data{'phone'}, + $data{'borrowernotes'},$data{'altphone'},$data{'institution_name'}, + $data{'initials'},$data{'streetaddress'},$data{'ethnicity'}, + $data{'gna'},$data{'lost'},$data{'debarred'}, + $data{'textmessaging'},$data{'branchcode'}, + $data{'zipcode'},$data{'homezipcode'}, + $data{'borrowernumber'}); } else { my $surname=$data{'institution_name'}; - $sth2=$dbh->prepare("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,branchcode,zipcode,homezipcode) - values ('',?,?, - '',?,?,?, - ?,?,'',?, - ?, - now(),?,?,?, - ?,'I',?,?,?, - ?,?,?, - ?,?,'','',?,?,?)"); - $sth2->execute($data{'expiry'},$data{'cardnumber_institution'}, - $data{'ethnotes'},$data{'address'},$data{'faxnumber'}, - $data{'firstname'},$data{'altnotes'},$data{'contactname'}, - $data{'emailaddress'}, - $data{'streetcity'},$data{'altrelationship'},$data{'othernames'}, - $data{'phoneday'},$data{'city'},$data{'area'},$data{'phone'}, - $data{'borrowernotes'},$data{'altphone'},$surname,$data{'initials'}, - $data{'ethnicity'},$data{'borrowernumber'},$data{'branchcode'},$data{'zipcode'},$data{'homezipcode'}); + # note for code reading : 5 on each line + $sth2=$dbh->prepare("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, branchcode, + zipcode, homezipcode) + values ( ?,?,?,?,?, + ?,?,?,?,?, + ?,?,now(),?,?, + ?,?,?,?,?, + ?,?,?,?,?, + ?,?,?,?,?, + ?,? + )"); + $sth2->execute('', $data{'expiry'}, $data{'cardnumber_institution'}, '', $data{'ethnotes'}, + $data{'address'}, $data{'faxnumber'}, $surname, $data{'altnotes'}, '', + $data{'contactname'},$data{'emailaddress'}, $data{'streetcity'}, $data{'altrelationship'}, # only 4 because of now() + $data{'othernames'}, $data{'phoneday'}, 'I', $data{'city'}, $data{'area'}, + ''.$data{'phone'}, $data{'borrowernotes'}, $data{'altphone'}, $surname, ''.$data{'initials'}, + $data{'ethnicity'}, $data{'borrowernumber'}, '', '', $data{'branchcode'}, + $data{'zipcode'}, $data{'homezipcode'}); } $sth2->finish; diff --git a/koha-tmpl/intranet-tmpl/default/en/newimember.tmpl b/koha-tmpl/intranet-tmpl/default/en/newimember.tmpl index 300ca227fa..c5fb447547 100644 --- a/koha-tmpl/intranet-tmpl/default/en/newimember.tmpl +++ b/koha-tmpl/intranet-tmpl/default/en/newimember.tmpl @@ -6,6 +6,167 @@ Invalid cardnumber.

+

Confirm Record

+ + " > + + + + + + + " > + + + + + + + + + + + + + + + " > + + + + + + + + + + + " > + + + + + + + + + + + + + + + + + + + + + + + " > + + + + + + + + + + + + + + + + + + + " > + + + + + + +
/images/background-mem.gif"> + NEW MEMBER +
+ Name + + +
/images/background-mem.gif"> + MEMBERSHIP DETAILS +
+ Membership Number + + +
+ Card Number + + +
+ Joining Branch + + +
/images/background-mem.gif"> + MEMBER ADDRESS +
+ Postal Address + + +
+ Home Address + + +
/images/background-mem.gif"> + MEMBER CONTACT DETAIL +
+ Phone (Home) + + +
+ Phone (Daytime) + + +
+ Fax + + +
+ E-mail + + +
+ Text messaging + + +
/images/background-mem.gif"> + ALTERNATIVE CONTACT DETAIL +
+ Name + + +
+ Phone + + +
+ Relationship + + +
+ Notes + + +
/images/background-mem.gif"> + NOTES +
+ General Notes + + +

Valid values. click OK to confirm this new borrower

-- 2.39.5