View | Details | Raw Unified | Return to bug 26558
Collapse All | Expand All

(-)a/members/memberentry.pl (-14 / +12 lines)
Lines 110-115 my $guarantor = undef; Link Here
110
$guarantor = Koha::Patrons->find( $guarantor_id ) if $guarantor_id;
110
$guarantor = Koha::Patrons->find( $guarantor_id ) if $guarantor_id;
111
$template->param( guarantor => $guarantor );
111
$template->param( guarantor => $guarantor );
112
112
113
my @new_guarantors;
114
my @new_guarantor_id           = $input->multi_param('new_guarantor_id');
115
my @new_guarantor_relationship = $input->multi_param('new_guarantor_relationship');
116
foreach my $gid ( @new_guarantor_id ) {
117
    my $patron = Koha::Patrons->find( $gid );
118
    my $relationship = shift( @new_guarantor_relationship );
119
    next unless $patron;
120
    my $g = { patron => $patron, relationship => $relationship };
121
    push( @new_guarantors, $g );
122
}
123
$template->param( new_guarantors => \@new_guarantors );
124
113
my @delete_guarantor = $input->multi_param('delete_guarantor');
125
my @delete_guarantor = $input->multi_param('delete_guarantor');
114
foreach my $id ( @delete_guarantor ) {
126
foreach my $id ( @delete_guarantor ) {
115
    my $r = Koha::Patron::Relationships->find( $id );
127
    my $r = Koha::Patron::Relationships->find( $id );
Lines 250-268 if ( ( $op eq 'insert' ) and !$nodouble ) { Link Here
250
    if ( $patrons->count > 0) {
262
    if ( $patrons->count > 0) {
251
        $nodouble = 0;
263
        $nodouble = 0;
252
        $check_member = $patrons->next->borrowernumber;
264
        $check_member = $patrons->next->borrowernumber;
253
254
255
        my @new_guarantors;
256
        my @new_guarantor_id           = $input->multi_param('new_guarantor_id');
257
        my @new_guarantor_relationship = $input->multi_param('new_guarantor_relationship');
258
        foreach my $gid ( @new_guarantor_id ) {
259
            my $patron = Koha::Patrons->find( $gid );
260
            my $relationship = shift( @new_guarantor_relationship );
261
            next unless $patron;
262
            my $g = { patron => $patron, relationship => $relationship };
263
            push( @new_guarantors, $g );
264
        }
265
        $template->param( new_guarantors => \@new_guarantors );
266
    }
265
    }
267
}
266
}
268
267
269
- 

Return to bug 26558