use C4::Output;
use C4::ImportBatch;
use C4::Matcher;
-use C4::Search qw/FindDuplicate/;
use C4::Acquisition;
use C4::Biblio;
use C4::Items;
my @discount = $input->multi_param('discount');
my @sort1 = $input->multi_param('sort1');
my @sort2 = $input->multi_param('sort2');
+ my $matcher_id = $input->multi_param('matcher_id');
my $active_currency = Koha::Acquisition::Currencies->get_active;
for my $biblio (@$biblios){
# Check if this import_record_id was selected
# 1st insert the biblio, or find it through matcher
unless ( $biblionumber ) {
- $duplinbatch=$import_batch_id and next if FindDuplicate($marcrecord);
+ if ($matcher_id) {
+ my $matcher = C4::Matcher->fetch($matcher_id);
+ my @matches = $matcher->get_matches( $marcrecord, my $max_matches = 1 );
+ if ( @matches ) {
+ $duplinbatch = $import_batch_id;
+ next;
+ }
+ }
# add the biblio
my $bibitemnum;
</ul>
<div id="records_to_import">
- <span class="checkall"><a id="checkAll" href="#">Check all</a></span>
- <span class="uncheckall"><a id="unCheckAll" href="#">Uncheck all</a></span>
- <label for="showallbudgets" style="float:none;width:auto;"> Show inactive funds:</label>
- <input type="checkbox" id="showallbudgets" />
+ <div id="searchheader">
+ <div>
+ <span class="checkall"><a id="checkAll" href="#">Select all</a></span>
+ |
+ <span class="uncheckall"><a id="unCheckAll" href="#">Clear all</a></span>
+ |
+ <span>
+ <label for="matcher_id">Matching:</label>
+ <select name="matcher_id" id="matcher_id">
+ <option value="">Do not look for matching records</option>
+ [% FOREACH available_matcher IN available_matchers %]
+ [% IF ( available_matcher.code == current_matcher_code ) %]
+ <option value="[% available_matcher.matcher_id %]" selected="selected">
+ [% available_matcher.code %] ([% available_matcher.description %])
+ </option>
+ [% ELSE %]
+ <option value="[% available_matcher.matcher_id %]">
+ [% available_matcher.code %] ([% available_matcher.description %])
+ </option>
+ [% END %]
+ [% END %]
+ </select>
+ </span>
+ |
+ <span>
+ <label for="showallbudgets" style="float:none;width:auto;"> Show inactive funds:</label>
+ <input type="checkbox" id="showallbudgets" />
+ </span>
+ </div>
+ </div>
+
<input type="hidden" name="op" value="import_records"/>
<input type="hidden" name="basketno" value="[% basketno %]" />
<input type="hidden" name="booksellerid" value="[% booksellerid %]" />