https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23403
--- Comment #1 from Magnus Enger <mag...@libriotech.no> --- C4::SIP::ILS::Patron::new() looks for a patron based on either cardnumber or userid, around line 41: my $patron = Koha::Patrons->find( { cardnumber => $patron_id } ) || Koha::Patrons->find( { userid => $patron_id } ); but then we set the id of the patron to the value of the barcode field, around line 77: id => $kp->{cardnumber}, # to SIP, the id is the BARCODE, not userid If there is no barcode, the id will be empty. Then in C4::SIP::ILS::Transaction::Checkout::do_checkout() we use the id to find the patron, around line 53: my $patron_barcode = $self->{patron}->id; ... my $patron = Koha::Patrons->find( { cardnumber => $patron_barcode } ); And I guess ->find( { cardnumber => '' } ) returns the first patron that has an empty cardnumber. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes. _______________________________________________ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/