Lines 31-36
use C4::Auth;
Link Here
|
31 |
use C4::Output; |
31 |
use C4::Output; |
32 |
use C4::ImportBatch; |
32 |
use C4::ImportBatch; |
33 |
use C4::Matcher; |
33 |
use C4::Matcher; |
|
|
34 |
use C4::Search qw/FindDuplicate/; |
34 |
use C4::Acquisition; |
35 |
use C4::Acquisition; |
35 |
use C4::Biblio; |
36 |
use C4::Biblio; |
36 |
use C4::Items; |
37 |
use C4::Items; |
Lines 159-171
if ($op eq ""){
Link Here
|
159 |
# 1st insert the biblio, or find it through matcher |
160 |
# 1st insert the biblio, or find it through matcher |
160 |
unless ( $biblionumber ) { |
161 |
unless ( $biblionumber ) { |
161 |
if ($matcher_id) { |
162 |
if ($matcher_id) { |
162 |
my $matcher = C4::Matcher->fetch($matcher_id); |
163 |
if ( $matcher_id eq '_TITLE_AUTHOR_' ) { |
163 |
my @matches = $matcher->get_matches( $marcrecord, my $max_matches = 1 ); |
164 |
$duplinbatch = $import_batch_id if FindDuplicate($marcrecord); |
164 |
if ( @matches ) { |
|
|
165 |
$duplinbatch = $import_batch_id; |
166 |
next; |
167 |
} |
165 |
} |
|
|
166 |
else { |
167 |
my $matcher = C4::Matcher->fetch($matcher_id); |
168 |
my @matches = $matcher->get_matches( $marcrecord, my $max_matches = 1 ); |
169 |
$duplinbatch = $import_batch_id if @matches; |
170 |
} |
171 |
|
172 |
next if $duplinbatch; |
168 |
} |
173 |
} |
|
|
174 |
|
169 |
# add the biblio |
175 |
# add the biblio |
170 |
my $bibitemnum; |
176 |
my $bibitemnum; |
171 |
|
177 |
|