What happens, and what should happen, when you receive an ILL and try to add a barcode that already exists in Koha?
# Set a barcode, if one was supplied
my $barcode = $params->{other}->{ill_barcode};
if ( $barcode ) {
my $item = Koha::Items->find({ 'biblionumber' => $request->biblio_id });
if ( $item->barcode ) {
warn "Item already has barcode: " . $item->barcode;
} else {
$item->barcode( $barcode );
$item->store;
}
}
What happens, and what should happen, when you receive an ILL and try to add a barcode that already exists in Koha?