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

(-)a/acqui/addorderiso2709.pl (-3 / +6 lines)
Lines 158-163 if ($op eq ""){ Link Here
158
    my $import_batch_id = $cgiparams->{'import_batch_id'};
158
    my $import_batch_id = $cgiparams->{'import_batch_id'};
159
    my $biblios = GetImportRecordsRange($import_batch_id);
159
    my $biblios = GetImportRecordsRange($import_batch_id);
160
    my @import_record_id_selected = $input->param("import_record_id");
160
    my @import_record_id_selected = $input->param("import_record_id");
161
    my @overlay = $input->param("overlay");
161
    my @quantities = $input->param('quantity');
162
    my @quantities = $input->param('quantity');
162
    my @prices = $input->param('price');
163
    my @prices = $input->param('price');
163
    my @budgets_id = $input->param('budget_id');
164
    my @budgets_id = $input->param('budget_id');
Lines 172-177 if ($op eq ""){ Link Here
172
        my $marcrecord = MARC::Record->new_from_usmarc($marcblob) || die "couldn't translate marc information";
173
        my $marcrecord = MARC::Record->new_from_usmarc($marcblob) || die "couldn't translate marc information";
173
        my $match = GetImportRecordMatches( $biblio->{'import_record_id'}, 1 );
174
        my $match = GetImportRecordMatches( $biblio->{'import_record_id'}, 1 );
174
        my $biblionumber=$#$match > -1?$match->[0]->{'biblionumber'}:0;
175
        my $biblionumber=$#$match > -1?$match->[0]->{'biblionumber'}:0;
176
        my $c_overlay = shift @overlay;
175
        my $c_quantity = shift( @quantities ) || GetMarcQuantity($marcrecord, C4::Context->preference('marcflavour') ) || 1;
177
        my $c_quantity = shift( @quantities ) || GetMarcQuantity($marcrecord, C4::Context->preference('marcflavour') ) || 1;
176
        my $c_budget_id = shift( @budgets_id ) || $input->param('all_budget_id') || $budget_id;
178
        my $c_budget_id = shift( @budgets_id ) || $input->param('all_budget_id') || $budget_id;
177
        my $c_discount = shift ( @discount);
179
        my $c_discount = shift ( @discount);
Lines 179-186 if ($op eq ""){ Link Here
179
        my $c_sort1 = shift( @sort1 ) || $input->param('all_sort1') || '';
181
        my $c_sort1 = shift( @sort1 ) || $input->param('all_sort1') || '';
180
        my $c_sort2 = shift( @sort2 ) || $input->param('all_sort2') || '';
182
        my $c_sort2 = shift( @sort2 ) || $input->param('all_sort2') || '';
181
183
182
        # 1st insert the biblio, or find it through matcher
184
        # INSERT the biblio if no match found, or if we want to overlay the existing match
183
        unless ( $biblionumber ) {
185
        if ( not($biblionumber) || $c_overlay ) {
184
            # add the biblio
186
            # add the biblio
185
            my $bibitemnum;
187
            my $bibitemnum;
186
188
Lines 195-201 if ($op eq ""){ Link Here
195
                    }
197
                    }
196
                }
198
                }
197
            }
199
            }
198
            ( $biblionumber, $bibitemnum ) = AddBiblio( $marcrecord, $cgiparams->{'frameworkcode'} || '' );
200
            ( $biblionumber, $bibitemnum ) = AddBiblio( $marcrecord, $cgiparams->{'frameworkcode'} || '' ) unless $c_overlay;
201
            ModBiblio( $marcrecord, $biblionumber, $cgiparams->{'frameworkcode'} || '' ) if $c_overlay;
199
            SetImportRecordStatus( $biblio->{'import_record_id'}, 'imported' );
202
            SetImportRecordStatus( $biblio->{'import_record_id'}, 'imported' );
200
203
201
            #We need to provide information to koha.import_record_matches to tell Koha that this import_record matches the
204
            #We need to provide information to koha.import_record_matches to tell Koha that this import_record matches the
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt (-1 / +1 lines)
Lines 210-215 Link Here
210
                                [% END %]
210
                                [% END %]
211
                                [% IF ( biblio.match_biblionumber ) %]
211
                                [% IF ( biblio.match_biblionumber ) %]
212
                                  Matches biblio [% biblio.match_biblionumber %] (score = [% biblio.match_score %]): <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblio.match_biblionumber %]">[% biblio.match_citation %]</a>
212
                                  Matches biblio [% biblio.match_biblionumber %] (score = [% biblio.match_score %]): <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblio.match_biblionumber %]">[% biblio.match_citation %]</a>
213
                                  Overlay? <input type="checkbox" name="overlay" id="overlay_record_[% biblio.import_record_id %]" value="[% biblio.import_record_id %]" />
213
                                [% END %]
214
                                [% END %]
214
                              </span>
215
                              </span>
215
                            </li>
216
                            </li>
216
- 

Return to bug 13182