Continuing work on the nonmarc simple acq
[koha.git] / insertdata.pl
index 1dc516a..8fe72d0 100755 (executable)
@@ -51,6 +51,7 @@ $sth->execute;
 if (my $data=$sth->fetchrow_hashref){
   $data{'dateofbirth'}=format_date_in_iso($data{'dateofbirth'});
   $data{'joining'}=format_date_in_iso($data{'joining'});
+  $data{'expiry'}=format_date_in_iso($data{'expiry'});
   $query="update borrowers set title='$data{'title'}',expiry='$data{'expiry'}',
   cardnumber='$data{'cardnumber'}',sex='$data{'sex'}',ethnotes='$data{'ethnicnotes'}',
   streetaddress='$data{'address'}',faxnumber='$data{'faxnumber'}',firstname='$data{'firstname'}',
@@ -67,6 +68,7 @@ if (my $data=$sth->fetchrow_hashref){
 }else{
   $data{'dateofbirth'}=format_date_in_iso($data{'dateofbirth'});
   $data{'joining'}=format_date_in_iso($data{'joining'});
+  $data{'expiry'}=format_date_in_iso($data{'expiry'}); 
   $query="insert into borrowers (title,expiry,cardnumber,sex,ethnotes,streetaddress,faxnumber,
   firstname,altnotes,dateofbirth,contactname,emailaddress,textmessaging,dateenrolled,streetcity,
   altrelationship,othernames,phoneday,categorycode,city,area,phone,borrowernotes,altphone,surname,