koha-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Koha-cvs] CVS: koha insertidata.pl,1.5.2.1,1.5.2.2


From: Paul POULAIN
Subject: [Koha-cvs] CVS: koha insertidata.pl,1.5.2.1,1.5.2.2
Date: Mon, 22 Dec 2003 06:56:38 -0800

Update of /cvsroot/koha/koha
In directory sc8-pr-cvs1:/tmp/cvs-serv29048

Modified Files:
      Tag: rel_2_0
        insertidata.pl 
Log Message:
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)

Index: insertidata.pl
===================================================================
RCS file: /cvsroot/koha/koha/insertidata.pl,v
retrieving revision 1.5.2.1
retrieving revision 1.5.2.2
diff -C2 -r1.5.2.1 -r1.5.2.2
*** insertidata.pl      19 Dec 2003 02:11:38 -0000      1.5.2.1
--- insertidata.pl      22 Dec 2003 14:56:35 -0000      1.5.2.2
***************
*** 61,87 ****
        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'});
  } 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'});
  }
  
--- 61,103 ----
        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'});
  } else {
        my $surname=$data{'institution_name'};
!       # 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'});
  }
  




reply via email to

[Prev in Thread] Current Thread [Next in Thread]