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

(-)a/C4/ImportBatch.pm (-7 / +18 lines)
Lines 205-211 sub AddImportBatch { Link Here
205
    my (@fields, @vals);
205
    my (@fields, @vals);
206
    foreach (qw( matcher_id template_id branchcode
206
    foreach (qw( matcher_id template_id branchcode
207
                 overlay_action nomatch_action item_action
207
                 overlay_action nomatch_action item_action
208
                 import_status batch_type file_name comments record_type )) {
208
                 import_status batch_type file_name comments 
209
                 record_type is_order )) {
209
        if (exists $params->{$_}) {
210
        if (exists $params->{$_}) {
210
            push @fields, $_;
211
            push @fields, $_;
211
            push @vals, $params->{$_};
212
            push @vals, $params->{$_};
Lines 318-324 sub ModAuthInBatch { Link Here
318
  ($batch_id, $num_records, $num_items, @invalid_records) = 
319
  ($batch_id, $num_records, $num_items, @invalid_records) = 
319
    BatchStageMarcRecords($record_type, $encoding, $marc_records, $file_name,
320
    BatchStageMarcRecords($record_type, $encoding, $marc_records, $file_name,
320
                          $comments, $branch_code, $parse_items,
321
                          $comments, $branch_code, $parse_items,
321
                          $leave_as_staging, 
322
                          $leave_as_staging, is_order,
322
                          $progress_interval, $progress_callback);
323
                          $progress_interval, $progress_callback);
323
324
324
=cut
325
=cut
Lines 332-337 sub BatchStageMarcRecords { Link Here
332
    my $branch_code = shift;
333
    my $branch_code = shift;
333
    my $parse_items = shift;
334
    my $parse_items = shift;
334
    my $leave_as_staging = shift;
335
    my $leave_as_staging = shift;
336
    my $is_order = shift;
335
337
336
    # optional callback to monitor status 
338
    # optional callback to monitor status 
337
    # of job
339
    # of job
Lines 351-356 sub BatchStageMarcRecords { Link Here
351
            file_name => $file_name,
353
            file_name => $file_name,
352
            comments => $comments,
354
            comments => $comments,
353
            record_type => $record_type,
355
            record_type => $record_type,
356
            is_order => $is_order,
354
        } );
357
        } );
355
    if ($parse_items) {
358
    if ($parse_items) {
356
        SetImportBatchItemAction($batch_id, 'always_add');
359
        SetImportBatchItemAction($batch_id, 'always_add');
Lines 915-935 sub GetStagedWebserviceBatches { Link Here
915
918
916
=head2 GetImportBatchRangeDesc
919
=head2 GetImportBatchRangeDesc
917
920
918
  my $results = GetImportBatchRangeDesc($offset, $results_per_group);
921
  my $results = GetImportBatchRangeDesc($offset, $results_per_group, $is_order);
919
922
920
Returns a reference to an array of hash references corresponding to
923
Returns a reference to an array of hash references corresponding to
921
import_batches rows (sorted in descending order by import_batch_id)
924
import_batches rows (sorted in descending order by import_batch_id)
922
start at the given offset.
925
start at the given offset.
923
926
927
Pass in $is_order = 1 to get only batches marked as order records
928
924
=cut
929
=cut
925
930
926
sub GetImportBatchRangeDesc {
931
sub GetImportBatchRangeDesc {
927
    my ($offset, $results_per_group) = @_;
932
    my ($offset, $results_per_group,$is_order) = @_;
933
934
    my $is_order_limit = $is_order ? "AND is_order = 1" : q{};
928
935
929
    my $dbh = C4::Context->dbh;
936
    my $dbh = C4::Context->dbh;
930
    my $query = "SELECT * FROM import_batches
937
    my $query = "
931
                                    WHERE batch_type IN ('batch', 'webservice')
938
        SELECT * FROM import_batches
932
                                    ORDER BY import_batch_id DESC";
939
        WHERE batch_type IN ('batch', 'webservice')
940
        $is_order_limit
941
        ORDER BY import_batch_id DESC
942
    ";
943
933
    my @params;
944
    my @params;
934
    if ($results_per_group){
945
    if ($results_per_group){
935
        $query .= " LIMIT ?";
946
        $query .= " LIMIT ?";
(-)a/acqui/addorderiso2709.pl (-7 / +51 lines)
Lines 58-69 my ($template, $loggedinuser, $cookie, $userflags) = get_template_and_user({ Link Here
58
my $cgiparams = $input->Vars;
58
my $cgiparams = $input->Vars;
59
my $op = $cgiparams->{'op'} || '';
59
my $op = $cgiparams->{'op'} || '';
60
my $booksellerid  = $input->param('booksellerid');
60
my $booksellerid  = $input->param('booksellerid');
61
my $is_order = $input->param('is_order');
61
my $bookseller = GetBookSellerFromId($booksellerid);
62
my $bookseller = GetBookSellerFromId($booksellerid);
62
my $data;
63
my $data;
63
64
64
$template->param(scriptname => "/cgi-bin/koha/acqui/addorderiso2709.pl",
65
$template->param(scriptname => "/cgi-bin/koha/acqui/addorderiso2709.pl",
65
                booksellerid => $booksellerid,
66
                booksellerid => $booksellerid,
66
                booksellername => $bookseller->{name},
67
                booksellername => $bookseller->{name},
68
                is_order => $is_order,
67
                );
69
                );
68
70
69
if ($cgiparams->{'import_batch_id'} && $op eq ""){
71
if ($cgiparams->{'import_batch_id'} && $op eq ""){
Lines 81-87 if (! $cgiparams->{'basketno'}){ Link Here
81
if ($op eq ""){
83
if ($op eq ""){
82
    $template->param("basketno" => $cgiparams->{'basketno'});
84
    $template->param("basketno" => $cgiparams->{'basketno'});
83
#display batches
85
#display batches
84
    import_batches_list($template);
86
    import_batches_list( $template, $is_order );
85
#
87
#
86
# 2nd step = display the content of the choosen file
88
# 2nd step = display the content of the choosen file
87
#
89
#
Lines 122-128 if ($op eq ""){ Link Here
122
                     "basketno"      => $cgiparams->{'basketno'},
124
                     "basketno"      => $cgiparams->{'basketno'},
123
                     loop_currencies  => \@loop_currency,
125
                     loop_currencies  => \@loop_currency,
124
                     );
126
                     );
125
    import_biblios_list($template, $cgiparams->{'import_batch_id'});
127
    my $cells = import_biblios_list($template, $cgiparams->{'import_batch_id'});
128
    warn Data::Dumper::Dumper( $cells );
126
    if ( C4::Context->preference('AcqCreateItem') eq 'ordering' ) {
129
    if ( C4::Context->preference('AcqCreateItem') eq 'ordering' ) {
127
        # prepare empty item form
130
        # prepare empty item form
128
        my $cell = PrepareItemrecordDisplay( '', '', '', 'ACQ' );
131
        my $cell = PrepareItemrecordDisplay( '', '', '', 'ACQ' );
Lines 268-273 if ($op eq ""){ Link Here
268
            my @serials      = $input->param('serial');
271
            my @serials      = $input->param('serial');
269
            my @ind_tag   = $input->param('ind_tag');
272
            my @ind_tag   = $input->param('ind_tag');
270
            my @indicator = $input->param('indicator');
273
            my @indicator = $input->param('indicator');
274
275
            if ($is_order) {
276
                my ( $notforloan_field, $notforloan_subfield ) =
277
                  GetMarcFromKohaField('items.notforloan');
278
                push( @tags,         $notforloan_field );
279
                push( @subfields,    $notforloan_subfield );
280
                push( @field_values, '-1' );
281
282
                my ( $homebranch_field, $homebranch_subfield ) =
283
                  GetMarcFromKohaField('items.homebranch');
284
                push( @tags,         $homebranch_field );
285
                push( @subfields,    $homebranch_subfield );
286
                push( @field_values, C4::Context->userenv->{'branch'} );
287
288
                my ( $holdingbranch_field, $holdingbranch_subfield ) =
289
                  GetMarcFromKohaField('items.holdingbranch');
290
                push( @tags,         $holdingbranch_field );
291
                push( @subfields,    $holdingbranch_subfield );
292
                push( @field_values, C4::Context->userenv->{'branch'} );
293
294
                my $infos = get_infos_syspref($marcrecord, ['itype']);
295
                my ( $itype_field, $itype_subfield ) =
296
                  GetMarcFromKohaField('items.itype');
297
                push( @tags,         $itype_field );
298
                push( @subfields,    $itype_subfield );
299
                push( @field_values, $infos->{itype} );
300
                warn "ITYPE: " . $infos->{itype};
301
            }
302
271
            my $item;
303
            my $item;
272
            push @{ $item->{tags} },         $tags[0];
304
            push @{ $item->{tags} },         $tags[0];
273
            push @{ $item->{subfields} },    $subfields[0];
305
            push @{ $item->{subfields} },    $subfields[0];
Lines 347-354 output_html_with_http_headers $input, $cookie, $template->output; Link Here
347
379
348
380
349
sub import_batches_list {
381
sub import_batches_list {
350
    my ($template) = @_;
382
    my ($template, $is_order) = @_;
351
    my $batches = GetImportBatchRangeDesc();
383
    my $batches = GetImportBatchRangeDesc(undef,undef,$is_order);
352
384
353
    my @list = ();
385
    my @list = ();
354
    foreach my $batch (@$batches) {
386
    foreach my $batch (@$batches) {
Lines 446-451 sub import_biblios_list { Link Here
446
                        item_action => $item_action
478
                        item_action => $item_action
447
                    );
479
                    );
448
    batch_info($template, $batch);
480
    batch_info($template, $batch);
481
482
    return \@list;
449
}
483
}
450
484
451
sub batch_info {
485
sub batch_info {
Lines 489-496 sub add_matcher_list { Link Here
489
    $template->param(available_matchers => \@matchers);
523
    $template->param(available_matchers => \@matchers);
490
}
524
}
491
525
492
sub get_infos_syspref {
526
sub GetMarcFieldsToOrderAsYAML {
493
    my ($record, $field_list) = @_;
494
    my $syspref = C4::Context->preference('MarcFieldsToOrder');
527
    my $syspref = C4::Context->preference('MarcFieldsToOrder');
495
    $syspref = "$syspref\n\n"; # YAML is anal on ending \n. Surplus does not hurt
528
    $syspref = "$syspref\n\n"; # YAML is anal on ending \n. Surplus does not hurt
496
    my $yaml = eval {
529
    my $yaml = eval {
Lines 498-505 sub get_infos_syspref { Link Here
498
    };
531
    };
499
    if ( $@ ) {
532
    if ( $@ ) {
500
        warn "Unable to parse MarcFieldsToOrder syspref : $@";
533
        warn "Unable to parse MarcFieldsToOrder syspref : $@";
501
        return ();
534
        return;
535
    } else {
536
        return $yaml;
502
    }
537
    }
538
}
539
540
sub get_infos_syspref {
541
    my ($record, $field_list) = @_;
542
543
    my $yaml = GetMarcFieldsToOrderAsYAML;
544
    return unless $yaml;
545
503
    my $r;
546
    my $r;
504
    for my $field_name ( @$field_list ) {
547
    for my $field_name ( @$field_list ) {
505
        my @fields = split /\|/, $yaml->{$field_name};
548
        my @fields = split /\|/, $yaml->{$field_name};
Lines 514-516 sub get_infos_syspref { Link Here
514
    }
557
    }
515
    return $r;
558
    return $r;
516
}
559
}
560
(-)a/installer/data/mysql/kohastructure.sql (+1 lines)
Lines 974-979 CREATE TABLE `import_batches` ( -- information about batches of marc records tha Link Here
974
  `record_type` enum('biblio', 'auth', 'holdings') NOT NULL default 'biblio', -- type of record in the batch
974
  `record_type` enum('biblio', 'auth', 'holdings') NOT NULL default 'biblio', -- type of record in the batch
975
  `file_name` varchar(100), -- the name of the file uploaded
975
  `file_name` varchar(100), -- the name of the file uploaded
976
  `comments` mediumtext, -- any comments added when the file was uploaded
976
  `comments` mediumtext, -- any comments added when the file was uploaded
977
  `is_order` tinyint(1) NOT NULL DEFAULT '0', -- defines if this is an Order Record for processing
977
  PRIMARY KEY (`import_batch_id`),
978
  PRIMARY KEY (`import_batch_id`),
978
  KEY `branchcode` (`branchcode`)
979
  KEY `branchcode` (`branchcode`)
979
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
980
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
(-)a/installer/data/mysql/updatedatabase.pl (+7 lines)
Lines 7162-7167 if (C4::Context->preference("Version") < TransformToNum($DBversion)) { Link Here
7162
   SetVersion ($DBversion);
7162
   SetVersion ($DBversion);
7163
}
7163
}
7164
7164
7165
$DBversion = "3.13.00.XXX";
7166
if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
7167
    $dbh->do("ALTER TABLE import_batches ADD is_order BOOLEAN NOT NULL DEFAULT '0' AFTER comments");
7168
   print "Upgrade to $DBversion done (Bug 10877 - Add 'Order Record' processing)\n";
7169
   SetVersion ($DBversion);
7170
7171
}
7165
=head1 FUNCTIONS
7172
=head1 FUNCTIONS
7166
7173
7167
=head2 TableExists($table)
7174
=head2 TableExists($table)
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/acquisitions-add-to-basket.inc (+1 lines)
Lines 17-22 Link Here
17
        <li><a href="/cgi-bin/koha/acqui/neworderempty.pl?booksellerid=[% booksellerid %]&amp;basketno=[% basketno %]">From a new (empty) record</a></li>
17
        <li><a href="/cgi-bin/koha/acqui/neworderempty.pl?booksellerid=[% booksellerid %]&amp;basketno=[% basketno %]">From a new (empty) record</a></li>
18
        <li><a href="/cgi-bin/koha/acqui/z3950_search.pl?booksellerid=[% booksellerid %]&amp;basketno=[% basketno %]">From an external source</a></li>
18
        <li><a href="/cgi-bin/koha/acqui/z3950_search.pl?booksellerid=[% booksellerid %]&amp;basketno=[% basketno %]">From an external source</a></li>
19
        <li><a href="/cgi-bin/koha/acqui/addorderiso2709.pl?booksellerid=[% booksellerid %]&amp;basketno=[% basketno %]"> From a staged file</a></li>
19
        <li><a href="/cgi-bin/koha/acqui/addorderiso2709.pl?booksellerid=[% booksellerid %]&amp;basketno=[% basketno %]"> From a staged file</a></li>
20
        <li><a href="/cgi-bin/koha/acqui/addorderiso2709.pl?booksellerid=[% booksellerid %]&amp;basketno=[% basketno %]&amp;is_order=1"> From a staged order file</a></li>
20
      </ul>
21
      </ul>
21
    [% ELSE %]
22
    [% ELSE %]
22
        <div class="dialog alert">
23
        <div class="dialog alert">
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt (-4 / +20 lines)
Lines 114-125 Link Here
114
114
115
            return disableUnchecked($(this));
115
            return disableUnchecked($(this));
116
        });
116
        });
117
118
        [% IF is_order %]
119
            $("#checkAll").click();
120
121
            $("#all_budget_id").hide();
122
            $('label[for="all_budget_id"]').hide();
123
        [% END %]
117
    });
124
    });
118
125
119
    function disableUnchecked(form){
126
    function disableUnchecked(form){
120
        $("div.biblio.unselected").each(function(){
127
        $("div.biblio.unselected").each(function(){
121
            $(this).find('select').attr('disabled', 'disabled');
122
            $(this).find('input').attr('disabled', 'disabled');
123
        });
128
        });
124
        return 1;
129
        return 1;
125
    }
130
    }
Lines 153-158 Link Here
153
                            <input type="hidden" name="[% cur.currency %]" value="[% cur.rate %]" />
158
                            <input type="hidden" name="[% cur.currency %]" value="[% cur.rate %]" />
154
                        [% END %]
159
                        [% END %]
155
160
161
                        [% IF is_order %]
162
                            <p>
163
                                <input type="submit" value="Save" /><a class="cancel" href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basketno %]">Cancel</a>
164
                            </p>
165
                        [% END %]
166
156
                        [% FOREACH biblio IN biblio_list %]
167
                        [% FOREACH biblio IN biblio_list %]
157
                        <fieldset class="biblio unselected rows">
168
                        <fieldset class="biblio unselected rows">
158
                          <legend>
169
                          <legend>
Lines 222-228 Link Here
222
                        <h2>Import All</h2>
233
                        <h2>Import All</h2>
223
                        <p>Import all the lines in the basket with the following parameters:</p>
234
                        <p>Import all the lines in the basket with the following parameters:</p>
224
235
225
                        [% IF ( items ) %]
236
                        [% IF ( items && !is_order ) %]
226
                        <fieldset class="rows">
237
                        <fieldset class="rows">
227
                            <legend>Item</legend>
238
                            <legend>Item</legend>
228
                            [% IF ( NoACQframework ) %]
239
                            [% IF ( NoACQframework ) %]
Lines 257-262 Link Here
257
                                    <!-- origquantityrec only here for javascript compatibility (additem.js needs it, useless here, usefull when receiveing an order -->
268
                                    <!-- origquantityrec only here for javascript compatibility (additem.js needs it, useless here, usefull when receiveing an order -->
258
                                    <input id="origquantityrec" readonly="readonly" type="hidden" name="origquantityrec" value="1" />
269
                                    <input id="origquantityrec" readonly="readonly" type="hidden" name="origquantityrec" value="1" />
259
                                </li>
270
                                </li>
271
                                [% UNLESS is_order %]
260
                                <li>
272
                                <li>
261
                                    [% IF ( close ) %]
273
                                    [% IF ( close ) %]
262
                                        <span class="label">Fund: </span>
274
                                        <span class="label">Fund: </span>
Lines 288-297 Link Here
288
                                        </li>
300
                                        </li>
289
                                    [% END %]
301
                                    [% END %]
290
                                </li>
302
                                </li>
303
                                [% END %]
291
                                <li>
304
                                <li>
292
                                    <label for="notes">Notes: </label>
305
                                    <label for="notes">Notes: </label>
293
                                    <textarea id="notes" cols="30" rows="3" name="all_notes"></textarea>
306
                                    <textarea id="notes" cols="30" rows="3" name="all_notes"></textarea>
294
                                </li>
307
                                </li>
308
                                [% UNLESS is_order %]
295
                                <li>
309
                                <li>
296
                                    <div class="hint">The 2 following fields are available for your own usage. They can be useful for statistical purposes</div>
310
                                    <div class="hint">The 2 following fields are available for your own usage. They can be useful for statistical purposes</div>
297
                                    <label for="sort1">Planning value1: </label>
311
                                    <label for="sort1">Planning value1: </label>
Lines 327-335 Link Here
327
                                    [% END %]
341
                                    [% END %]
328
                                  </span>
342
                                  </span>
329
                                </li>
343
                                </li>
344
                                [% END %]
330
                            </ol>
345
                            </ol>
331
                        </fieldset>
346
                        </fieldset>
332
                        <fieldset class="action">
347
                        <fieldset class="action">
348
                            <input type="hidden" name="is_order" value="[% is_order %]" />
333
                            <input type="submit" value="Save" /><a class="cancel" href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basketno %]">Cancel</a>
349
                            <input type="submit" value="Save" /><a class="cancel" href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basketno %]">Cancel</a>
334
                        </fieldset>
350
                        </fieldset>
335
351
Lines 357-363 Link Here
357
                        <td>[% batch_lis.import_status %]</td>
373
                        <td>[% batch_lis.import_status %]</td>
358
                        <td>[% batch_lis.staged_date | $KohaDates %] [% batch_lis.staged_hour %]</td>
374
                        <td>[% batch_lis.staged_date | $KohaDates %] [% batch_lis.staged_hour %]</td>
359
                        <td>[% batch_lis.num_biblios %]</td>
375
                        <td>[% batch_lis.num_biblios %]</td>
360
                        <td><a href="[% batch_lis.scriptname %]?import_batch_id=[% batch_lis.import_batch_id %]&amp;basketno=[% basketno %]&amp;booksellerid=[% booksellerid %]">Add orders</a></td>
376
                        <td><a href="[% batch_lis.scriptname %]?import_batch_id=[% batch_lis.import_batch_id %]&amp;basketno=[% basketno %]&amp;booksellerid=[% booksellerid %]&amp;is_order=[% is_order %]">Add orders</a></td>
361
                      </tr>
377
                      </tr>
362
                      [% END %]
378
                      [% END %]
363
                    </tbody>
379
                    </tbody>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/stage-marc-import.tt (+4 lines)
Lines 112-117 function CheckForm(f) { Link Here
112
            <option value='auth'>Authority</option>
112
            <option value='auth'>Authority</option>
113
        </select>
113
        </select>
114
    </li>
114
    </li>
115
    <li>
116
        <input type="checkbox" name="is_order" id="is_order" />
117
        <label for="is_order">Is an order file:</label>
118
    </li>
115
	<li>
119
	<li>
116
		<label for="encoding">Character encoding: </label>
120
		<label for="encoding">Character encoding: </label>
117
            <select name="encoding" id="encoding"><option value="utf8" selected="selected">UTF-8 (Default)</option><option value="MARC-8">MARC 8</option><option value="ISO_5426">ISO 5426</option><option value="ISO_6937">ISO 6937</option><option value=ISO_8859-1">ISO 8859-1</option><option value="EUC-KR">EUC-KR</option></select>
121
            <select name="encoding" id="encoding"><option value="utf8" selected="selected">UTF-8 (Default)</option><option value="MARC-8">MARC 8</option><option value="ISO_5426">ISO 5426</option><option value="ISO_6937">ISO 6937</option><option value=ISO_8859-1">ISO 8859-1</option><option value="EUC-KR">EUC-KR</option></select>
(-)a/misc/stage_file.pl (-1 / +4 lines)
Lines 45-50 my $input_file = ""; Link Here
45
my $batch_comment = "";
45
my $batch_comment = "";
46
my $want_help = 0;
46
my $want_help = 0;
47
my $no_replace ;
47
my $no_replace ;
48
my $is_order = 0;
48
49
49
my $result = GetOptions(
50
my $result = GetOptions(
50
    'encoding:s'    => \$encoding,
51
    'encoding:s'    => \$encoding,
Lines 54-59 my $result = GetOptions( Link Here
54
    'no-replace'    => \$no_replace,
55
    'no-replace'    => \$no_replace,
55
    'comment:s'     => \$batch_comment,
56
    'comment:s'     => \$batch_comment,
56
    'authorities'   => \$authorities,
57
    'authorities'   => \$authorities,
58
    'is-order'      => \$is_order,
57
    'h|help'        => \$want_help
59
    'h|help'        => \$want_help
58
);
60
);
59
61
Lines 99-105 sub process_batch { Link Here
99
101
100
    print "... staging MARC records -- please wait\n";
102
    print "... staging MARC records -- please wait\n";
101
    my ($batch_id, $num_valid_records, $num_items, @import_errors) =
103
    my ($batch_id, $num_valid_records, $num_items, @import_errors) =
102
        BatchStageMarcRecords($record_type, $encoding, $marc_records, $input_file, $batch_comment, '', $add_items, 0,
104
        BatchStageMarcRecords($record_type, $encoding, $marc_records, $input_file, $batch_comment, '', $add_items, 0, $is_order,
103
                              100, \&print_progress_and_commit);
105
                              100, \&print_progress_and_commit);
104
    print "... finished staging MARC records\n";
106
    print "... finished staging MARC records\n";
105
107
Lines 192-197 Parameters: Link Here
192
                            the record batch; if the comment
194
                            the record batch; if the comment
193
                            has spaces in it, surround the
195
                            has spaces in it, surround the
194
                            comment with quotation marks.
196
                            comment with quotation marks.
197
    --is-order              this file is a bibliographic order file
195
    --help or -h            show this message.
198
    --help or -h            show this message.
196
_USAGE_
199
_USAGE_
197
}
200
}
(-)a/tools/stage-marc-import.pl (-2 / +2 lines)
Lines 56-61 my $parse_items = $input->param('parse_items'); Link Here
56
my $item_action = $input->param('item_action');
56
my $item_action = $input->param('item_action');
57
my $comments = $input->param('comments');
57
my $comments = $input->param('comments');
58
my $record_type = $input->param('record_type');
58
my $record_type = $input->param('record_type');
59
my $is_order = $input->param('is_order') eq 'on';
59
my $encoding = $input->param('encoding');
60
my $encoding = $input->param('encoding');
60
my ($template, $loggedinuser, $cookie)
61
my ($template, $loggedinuser, $cookie)
61
	= get_template_and_user({template_name => "tools/stage-marc-import.tmpl",
62
	= get_template_and_user({template_name => "tools/stage-marc-import.tmpl",
Lines 131-137 if ($completedJobID) { Link Here
131
    }
132
    }
132
133
133
    # FIXME branch code
134
    # FIXME branch code
134
    my ($batch_id, $num_valid, $num_items, @import_errors) = BatchStageMarcRecords($record_type, $encoding, $marcrecord, $filename, $comments, '', $parse_items, 0, 50, staging_progress_callback($job, $dbh));
135
    my ($batch_id, $num_valid, $num_items, @import_errors) = BatchStageMarcRecords($record_type, $encoding, $marcrecord, $filename, $comments, '', $parse_items, 0, $is_order, 50, staging_progress_callback($job, $dbh));
135
136
136
    $dbh->commit();
137
    $dbh->commit();
137
138
138
- 

Return to bug 10877