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

(-)a/acqui/addorderiso2709.pl (-1 / +11 lines)
Lines 60-65 my ($template, $loggedinuser, $cookie, $userflags) = get_template_and_user({ Link Here
60
my $cgiparams = $input->Vars;
60
my $cgiparams = $input->Vars;
61
my $op = $cgiparams->{'op'} || '';
61
my $op = $cgiparams->{'op'} || '';
62
my $booksellerid  = $input->param('booksellerid');
62
my $booksellerid  = $input->param('booksellerid');
63
my $allmatch = $input->param('allmatch');
63
my $bookseller = Koha::Acquisition::Bookseller->fetch({ id => $booksellerid });
64
my $bookseller = Koha::Acquisition::Bookseller->fetch({ id => $booksellerid });
64
my $data;
65
my $data;
65
66
Lines 123-128 if ($op eq ""){ Link Here
123
    $template->param("batch_details" => 1,
124
    $template->param("batch_details" => 1,
124
                     "basketno"      => $cgiparams->{'basketno'},
125
                     "basketno"      => $cgiparams->{'basketno'},
125
                     loop_currencies  => \@loop_currency,
126
                     loop_currencies  => \@loop_currency,
127
                     "allmatch" => $allmatch,
126
                     );
128
                     );
127
    import_biblios_list($template, $cgiparams->{'import_batch_id'});
129
    import_biblios_list($template, $cgiparams->{'import_batch_id'});
128
    if ( C4::Context->preference('AcqCreateItem') eq 'ordering' ) {
130
    if ( C4::Context->preference('AcqCreateItem') eq 'ordering' ) {
Lines 157-162 if ($op eq ""){ Link Here
157
    # retrieve the file you want to import
159
    # retrieve the file you want to import
158
    my $import_batch_id = $cgiparams->{'import_batch_id'};
160
    my $import_batch_id = $cgiparams->{'import_batch_id'};
159
    my $biblios = GetImportRecordsRange($import_batch_id);
161
    my $biblios = GetImportRecordsRange($import_batch_id);
162
    my $duplinbatch;
163
    my $imported = 0;
160
    my @import_record_id_selected = $input->param("import_record_id");
164
    my @import_record_id_selected = $input->param("import_record_id");
161
    my @quantities = $input->param('quantity');
165
    my @quantities = $input->param('quantity');
162
    my @prices = $input->param('price');
166
    my @prices = $input->param('price');
Lines 181-186 if ($op eq ""){ Link Here
181
185
182
        # 1st insert the biblio, or find it through matcher
186
        # 1st insert the biblio, or find it through matcher
183
        unless ( $biblionumber ) {
187
        unless ( $biblionumber ) {
188
            $duplinbatch=$import_batch_id and next if FindDuplicate($marcrecord);
184
            # add the biblio
189
            # add the biblio
185
            my $bibitemnum;
190
            my $bibitemnum;
186
191
Lines 284-292 if ($op eq ""){ Link Here
284
        } else {
289
        } else {
285
            SetImportRecordStatus( $biblio->{'import_record_id'}, 'imported' );
290
            SetImportRecordStatus( $biblio->{'import_record_id'}, 'imported' );
286
        }
291
        }
292
        $imported++;
287
    }
293
    }
288
    # go to basket page
294
    # go to basket page
289
    print $input->redirect("/cgi-bin/koha/acqui/basket.pl?basketno=".$cgiparams->{'basketno'});
295
    if ( $imported ) {
296
        print $input->redirect("/cgi-bin/koha/acqui/basket.pl?basketno=".$cgiparams->{'basketno'}."&duplinbatch=$duplinbatch");
297
    } else {
298
        print $input->redirect("/cgi-bin/koha/acqui/addorderiso2709.pl?import_batch_id=$import_batch_id&basketno=".$cgiparams->{'basketno'}."&booksellerid=$booksellerid&allmatch=1");
299
    }
290
    exit;
300
    exit;
291
}
301
}
292
302
(-)a/acqui/basket.pl (+2 lines)
Lines 68-73 the supplier this script have to display the basket. Link Here
68
my $query        = new CGI;
68
my $query        = new CGI;
69
our $basketno     = $query->param('basketno');
69
our $basketno     = $query->param('basketno');
70
my $booksellerid = $query->param('booksellerid');
70
my $booksellerid = $query->param('booksellerid');
71
my $duplinbatch =  $query->param('duplinbatch');
71
72
72
my ( $template, $loggedinuser, $cookie, $userflags ) = get_template_and_user(
73
my ( $template, $loggedinuser, $cookie, $userflags ) = get_template_and_user(
73
    {
74
    {
Lines 431-436 if ( $op eq 'delete_confirm' ) { Link Here
431
        grouped              => $basket->{basketgroupid},
432
        grouped              => $basket->{basketgroupid},
432
        unclosable           => @orders ? 0 : 1, 
433
        unclosable           => @orders ? 0 : 1, 
433
        has_budgets          => $has_budgets,
434
        has_budgets          => $has_budgets,
435
        duplinbatch          => $duplinbatch,
434
    );
436
    );
435
}
437
}
436
438
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt (+6 lines)
Lines 158-163 Link Here
158
   <div id="bd">
158
   <div id="bd">
159
       <div id="yui-main">
159
       <div id="yui-main">
160
           <div class="yui-b">
160
           <div class="yui-b">
161
             [% IF ( allmatch ) %]<div class="dialog alert">
162
              <h4>No records imported</h4>
163
             No record have been imported because they all match an existing record in your catalog.<br />You'll have to treat them individually.
164
             </div>
165
             [% END %]
166
161
             [% IF ( batch_details ) %]
167
             [% IF ( batch_details ) %]
162
                <h1>Add orders from [% comments %]
168
                <h1>Add orders from [% comments %]
163
                    ([% file_name %] staged on [% upload_timestamp | $KohaDates with_hours => 1 %])
169
                    ([% file_name %] staged on [% upload_timestamp | $KohaDates with_hours => 1 %])
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt (-1 / +4 lines)
Lines 380-385 Link Here
380
            </div>
380
            </div>
381
            </div>
381
            </div>
382
        [% END %]
382
        [% END %]
383
        [% IF ( duplinbatch ) %]<div class="dialog alert">
384
        <h4>Duplicate warning</h4>
385
        <p>Some records have not been automatically added because they match an existing record in your catalog:<a href="/cgi-bin/koha/acqui/addorderiso2709.pl?import_batch_id=[% duplinbatch %]&amp;basketno=[% basketno %]&amp;booksellerid=[% booksellerid %]" title="Open in new window" target="_blank" class="popup" style="margin-left:10px">Display them</a></p>
386
        </div>[% END %]
383
387
384
        [% UNLESS ( delete_confirm ) %]
388
        [% UNLESS ( delete_confirm ) %]
385
        <div id="acqui_basket_content" class="yui-g">
389
        <div id="acqui_basket_content" class="yui-g">
386
- 

Return to bug 12074