[Koha-patches] [PATCH] (bug #3192) fix the fields filling adding a child

Nahuel ANGELINETTI nahuel.angelinetti at biblibre.com
Wed May 6 11:42:50 CEST 2009


This patch fix the hash values to fill-in the differents fields of the child, from garantor datas.
---
 members/memberentry.pl |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/members/memberentry.pl b/members/memberentry.pl
index b3582f3..25de989 100755
--- a/members/memberentry.pl
+++ b/members/memberentry.pl
@@ -166,12 +166,12 @@ if (($op eq 'insert') and !$nodouble){
 if (defined($guarantorid) and ($category_type eq 'C' || $category_type eq 'P') and $guarantorid ne '' ){
   my $guarantordata=GetMember($guarantorid);
   $guarantorinfo=$guarantordata->{'surname'}." , ".$guarantordata->{'firstname'};
-  if (!defined($data{'contactname'}) or $data{'contactname'} eq '' or $data{'contactname'} ne $guarantordata->{'surname'}) {
-    $data{'contactfirstname'}= $guarantordata->{'firstname'};
-    $data{'contactname'}     = $guarantordata->{'surname'};
-    $data{'contacttitle'}    = $guarantordata->{'title'};
+  if (!defined($newdata{'contactname'}) or $newdata{'contactname'} eq '' or $newdata{'contactname'} ne $guarantordata->{'surname'}) {
+    $newdata{'contactfirstname'}= $guarantordata->{'firstname'};
+    $newdata{'contactname'}     = $guarantordata->{'surname'};
+    $newdata{'contacttitle'}    = $guarantordata->{'title'};
 	  foreach (qw(streetnumber address streettype address2 zipcode city phone phonepro mobile fax email emailpro branchcode)) {
-		$data{$_} = $guarantordata->{$_};
+		$newdata{$_} = $guarantordata->{$_};
 	}
   }
 }
@@ -416,7 +416,7 @@ my $borrotitlepopup = CGI::popup_menu(-name=>'title',
         -default=>$default_borrowertitle
         );    
 
-my @relationships = split /,|\|/, C4::Context->preference('BorrowerRelationship');
+my @relationships = split (/,|\|/, C4::Context->preference('BorrowerRelationship'));
 my @relshipdata;
 while (@relationships) {
   my $relship = shift @relationships || '';
-- 
1.6.0.4




More information about the Koha-patches mailing list