@@ -, +, @@ error --- members/memberentry.pl | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) --- a/members/memberentry.pl +++ a/members/memberentry.pl @@ -110,6 +110,18 @@ my $guarantor = undef; $guarantor = Koha::Patrons->find( $guarantor_id ) if $guarantor_id; $template->param( guarantor => $guarantor ); +my @new_guarantors; +my @new_guarantor_id = $input->multi_param('new_guarantor_id'); +my @new_guarantor_relationship = $input->multi_param('new_guarantor_relationship'); +foreach my $gid ( @new_guarantor_id ) { + my $patron = Koha::Patrons->find( $gid ); + my $relationship = shift( @new_guarantor_relationship ); + next unless $patron; + my $g = { patron => $patron, relationship => $relationship }; + push( @new_guarantors, $g ); +} +$template->param( new_guarantors => \@new_guarantors ); + my @delete_guarantor = $input->multi_param('delete_guarantor'); foreach my $id ( @delete_guarantor ) { my $r = Koha::Patron::Relationships->find( $id ); @@ -250,19 +262,6 @@ if ( ( $op eq 'insert' ) and !$nodouble ) { if ( $patrons->count > 0) { $nodouble = 0; $check_member = $patrons->next->borrowernumber; - - - my @new_guarantors; - my @new_guarantor_id = $input->multi_param('new_guarantor_id'); - my @new_guarantor_relationship = $input->multi_param('new_guarantor_relationship'); - foreach my $gid ( @new_guarantor_id ) { - my $patron = Koha::Patrons->find( $gid ); - my $relationship = shift( @new_guarantor_relationship ); - next unless $patron; - my $g = { patron => $patron, relationship => $relationship }; - push( @new_guarantors, $g ); - } - $template->param( new_guarantors => \@new_guarantors ); } } --