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

(-)a/Koha/Patrons/Import.pm (-5 / +8 lines)
Lines 163-172 sub import_patrons { Link Here
163
        my $borrowernumber;
163
        my $borrowernumber;
164
        my $member;
164
        my $member;
165
        if ( defined($matchpoint) && ( $matchpoint eq 'cardnumber' ) && ( $borrower{'cardnumber'} ) ) {
165
        if ( defined($matchpoint) && ( $matchpoint eq 'cardnumber' ) && ( $borrower{'cardnumber'} ) ) {
166
            $member = GetMember( 'cardnumber' => $borrower{'cardnumber'} );
166
            $member = Koha::Patrons->find( { cardnumber => $borrower{'cardnumber'} } );
167
            if ($member) {
168
                $borrowernumber = $member->{'borrowernumber'};
169
            }
170
        }
167
        }
171
        elsif ($extended) {
168
        elsif ($extended) {
172
            if ( defined($matchpoint_attr_type) ) {
169
            if ( defined($matchpoint_attr_type) ) {
Lines 180-185 sub import_patrons { Link Here
180
            }
177
            }
181
        }
178
        }
182
179
180
        if ($member) {
181
            $member = $member->unblessed;
182
            $borrowernumber = $member->{'borrowernumber'};
183
        } else {
184
            $member = {};
185
        }
186
183
        if ( C4::Members::checkcardnumber( $borrower{cardnumber}, $borrowernumber ) ) {
187
        if ( C4::Members::checkcardnumber( $borrower{cardnumber}, $borrowernumber ) ) {
184
            push @errors,
188
            push @errors,
185
              {
189
              {
186
- 

Return to bug 12598