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

(-)a/acqui/addorderiso2709.pl (-6 / +12 lines)
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 139-145 if ($op eq ""){ Link Here
139
    my @discount = $input->multi_param('discount');
140
    my @discount = $input->multi_param('discount');
140
    my @sort1 = $input->multi_param('sort1');
141
    my @sort1 = $input->multi_param('sort1');
141
    my @sort2 = $input->multi_param('sort2');
142
    my @sort2 = $input->multi_param('sort2');
142
    my $matcher_id = $input->multi_param('matcher_id');
143
    my $matcher_id = $input->param('matcher_id');
143
    my $active_currency = Koha::Acquisition::Currencies->get_active;
144
    my $active_currency = Koha::Acquisition::Currencies->get_active;
144
    for my $biblio (@$biblios){
145
    for my $biblio (@$biblios){
145
        # Check if this import_record_id was selected
146
        # Check if this import_record_id was selected
Lines 158-170 if ($op eq ""){ Link Here
158
        # 1st insert the biblio, or find it through matcher
159
        # 1st insert the biblio, or find it through matcher
159
        unless ( $biblionumber ) {
160
        unless ( $biblionumber ) {
160
            if ($matcher_id) {
161
            if ($matcher_id) {
161
                my $matcher = C4::Matcher->fetch($matcher_id);
162
                if ( $matcher_id eq '_TITLE_AUTHOR_' ) {
162
                my @matches = $matcher->get_matches( $marcrecord, my $max_matches = 1 );
163
                    $duplinbatch = $import_batch_id if FindDuplicate($marcrecord);
163
                if ( @matches ) {
164
                    $duplinbatch = $import_batch_id;
165
                    next;
166
                }
164
                }
165
                else {
166
                    my $matcher = C4::Matcher->fetch($matcher_id);
167
                    my @matches = $matcher->get_matches( $marcrecord, my $max_matches = 1 );
168
                    $duplinbatch = $import_batch_id if @matches;
169
                }
170
171
                next if $duplinbatch;
167
            }
172
            }
173
168
            # add the biblio
174
            # add the biblio
169
            my $bibitemnum;
175
            my $bibitemnum;
170
176
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt (-1 / +1 lines)
Lines 198-203 Link Here
198
                            <span>
198
                            <span>
199
                                <label for="matcher_id">Matching:</label>
199
                                <label for="matcher_id">Matching:</label>
200
                                    <select name="matcher_id" id="matcher_id">
200
                                    <select name="matcher_id" id="matcher_id">
201
                                        <option value="_TITLE_AUTHOR_">Title and author</option>
201
                                        <option value="">Do not look for matching records</option>
202
                                        <option value="">Do not look for matching records</option>
202
                                        [% FOREACH available_matcher IN available_matchers %]
203
                                        [% FOREACH available_matcher IN available_matchers %]
203
                                            [% IF ( available_matcher.code == current_matcher_code ) %]
204
                                            [% IF ( available_matcher.code == current_matcher_code ) %]
204
- 

Return to bug 16493