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 (-6 / +48 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 266-271 if ($op eq ""){ Link Here
266
            my @serials      = $input->param('serial');
268
            my @serials      = $input->param('serial');
267
            my @ind_tag   = $input->param('ind_tag');
269
            my @ind_tag   = $input->param('ind_tag');
268
            my @indicator = $input->param('indicator');
270
            my @indicator = $input->param('indicator');
271
272
            if ($is_order) {
273
                my ( $notforloan_field, $notforloan_subfield ) =
274
                  GetMarcFromKohaField('items.notforloan');
275
                push( @tags,         $notforloan_field );
276
                push( @subfields,    $notforloan_subfield );
277
                push( @field_values, '-1' );
278
279
                my ( $homebranch_field, $homebranch_subfield ) =
280
                  GetMarcFromKohaField('items.homebranch');
281
                push( @tags,         $homebranch_field );
282
                push( @subfields,    $homebranch_subfield );
283
                push( @field_values, C4::Context->userenv->{'branch'} );
284
285
                my ( $holdingbranch_field, $holdingbranch_subfield ) =
286
                  GetMarcFromKohaField('items.holdingbranch');
287
                push( @tags,         $holdingbranch_field );
288
                push( @subfields,    $holdingbranch_subfield );
289
                push( @field_values, C4::Context->userenv->{'branch'} );
290
291
                my $infos = get_infos_syspref($marcrecord, ['itype']);
292
                my ( $itype_field, $itype_subfield ) =
293
                  GetMarcFromKohaField('items.itype');
294
                push( @tags,         $itype_field );
295
                push( @subfields,    $itype_subfield );
296
                push( @field_values, $infos->{itype} );
297
                warn "ITYPE: " . $infos->{itype};
298
            }
299
269
            my $item;
300
            my $item;
270
            push @{ $item->{tags} },         $tags[0];
301
            push @{ $item->{tags} },         $tags[0];
271
            push @{ $item->{subfields} },    $subfields[0];
302
            push @{ $item->{subfields} },    $subfields[0];
Lines 345-352 output_html_with_http_headers $input, $cookie, $template->output; Link Here
345
376
346
377
347
sub import_batches_list {
378
sub import_batches_list {
348
    my ($template) = @_;
379
    my ($template, $is_order) = @_;
349
    my $batches = GetImportBatchRangeDesc();
380
    my $batches = GetImportBatchRangeDesc(undef,undef,$is_order);
350
381
351
    my @list = ();
382
    my @list = ();
352
    foreach my $batch (@$batches) {
383
    foreach my $batch (@$batches) {
Lines 442-447 sub import_biblios_list { Link Here
442
                        item_action => $item_action
473
                        item_action => $item_action
443
                    );
474
                    );
444
    batch_info($template, $batch);
475
    batch_info($template, $batch);
476
477
    return \@list;
445
}
478
}
446
479
447
sub batch_info {
480
sub batch_info {
Lines 485-492 sub add_matcher_list { Link Here
485
    $template->param(available_matchers => \@matchers);
518
    $template->param(available_matchers => \@matchers);
486
}
519
}
487
520
488
sub get_infos_syspref {
521
sub GetMarcFieldsToOrderAsYAML {
489
    my ($record, $field_list) = @_;
490
    my $syspref = C4::Context->preference('MarcFieldsToOrder');
522
    my $syspref = C4::Context->preference('MarcFieldsToOrder');
491
    $syspref = "$syspref\n\n"; # YAML is anal on ending \n. Surplus does not hurt
523
    $syspref = "$syspref\n\n"; # YAML is anal on ending \n. Surplus does not hurt
492
    my $yaml = eval {
524
    my $yaml = eval {
Lines 494-501 sub get_infos_syspref { Link Here
494
    };
526
    };
495
    if ( $@ ) {
527
    if ( $@ ) {
496
        warn "Unable to parse MarcFieldsToOrder syspref : $@";
528
        warn "Unable to parse MarcFieldsToOrder syspref : $@";
497
        return ();
529
        return;
530
    } else {
531
        return $yaml;
498
    }
532
    }
533
}
534
535
sub get_infos_syspref {
536
    my ($record, $field_list) = @_;
537
538
    my $yaml = GetMarcFieldsToOrderAsYAML;
539
    return unless $yaml;
540
499
    my $r;
541
    my $r;
500
    for my $field_name ( @$field_list ) {
542
    for my $field_name ( @$field_list ) {
501
        next unless exists $yaml->{$field_name};
543
        next unless exists $yaml->{$field_name};
(-)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 7146-7151 if (C4::Context->preference("Version") < TransformToNum($DBversion)) { Link Here
7146
   SetVersion ($DBversion);
7146
   SetVersion ($DBversion);
7147
}
7147
}
7148
7148
7149
$DBversion = "3.13.00.XXX";
7150
if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
7151
    $dbh->do("ALTER TABLE import_batches ADD is_order BOOLEAN NOT NULL DEFAULT '0' AFTER comments");
7152
   print "Upgrade to $DBversion done (Bug 10877 - Add 'Order Record' processing)\n";
7153
   SetVersion ($DBversion);
7154
7155
}
7149
=head1 FUNCTIONS
7156
=head1 FUNCTIONS
7150
7157
7151
=head2 TableExists($table)
7158
=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 (-7 / +28 lines)
Lines 114-120 Link Here
114
114
115
            return disableUnchecked($(this));
115
            return disableUnchecked($(this));
116
        });
116
        });
117
117
        $('#tabs').tabs();
118
        $('#tabs').tabs();
119
120
        [% IF is_order %]
121
            $("#checkAll").click();
122
123
            $("#all_budget_id").hide();
124
            $('label[for="all_budget_id"]').hide();
125
        [% END %]
118
    });
126
    });
119
127
120
    function disableUnchecked(form){
128
    function disableUnchecked(form){
Lines 142-148 Link Here
142
                <div id="tabs" class="toptabs">
150
                <div id="tabs" class="toptabs">
143
                  <ul>
151
                  <ul>
144
                    <li><a href="#records_to_import">Select to import</a></li>
152
                    <li><a href="#records_to_import">Select to import</a></li>
145
                    <li><a href="#items_info" class="items_info">Item information</a></li>
153
                    [% UNLESS is_order %]
154
                        <li><a href="#items_info" class="items_info">Item information</a></li>
155
                    [% END %]
146
                    <li><a href="#accounting_details">Default accounting details</a></li>
156
                    <li><a href="#accounting_details">Default accounting details</a></li>
147
                  </ul>
157
                  </ul>
148
158
Lines 159-164 Link Here
159
                            <input type="hidden" name="[% cur.currency %]" value="[% cur.rate %]" />
169
                            <input type="hidden" name="[% cur.currency %]" value="[% cur.rate %]" />
160
                        [% END %]
170
                        [% END %]
161
171
172
                        [% IF is_order %]
173
                            <p>
174
                                <input type="submit" value="Save" /><a class="cancel" href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basketno %]">Cancel</a>
175
                            </p>
176
                        [% END %]
177
162
                        [% FOREACH biblio IN biblio_list %]
178
                        [% FOREACH biblio IN biblio_list %]
163
                        <fieldset class="biblio unselected rows" style="float:none;">
179
                        <fieldset class="biblio unselected rows" style="float:none;">
164
                          <legend>
180
                          <legend>
Lines 224-234 Link Here
224
                        </fieldset>
240
                        </fieldset>
225
                        [% END %]
241
                        [% END %]
226
                      </div>
242
                      </div>
243
                      [% IF ( items && !is_order ) %]
227
                      <div id="items_info">
244
                      <div id="items_info">
228
                        <h2>Item information</h2>
245
                        <h2>Item information</h2>
229
                        <p>Import all the checked items in the basket with the following parameters:</p>
246
                        <p>Import all the checked items in the basket with the following parameters:</p>
230
247
231
                        [% IF ( items ) %]
232
                        <fieldset class="rows" style="float:none;">
248
                        <fieldset class="rows" style="float:none;">
233
                            <legend>Item</legend>
249
                            <legend>Item</legend>
234
                            [% IF ( NoACQframework ) %]
250
                            [% IF ( NoACQframework ) %]
Lines 254-261 Link Here
254
                            </div>
270
                            </div>
255
                            [% END %] <!-- /items -->
271
                            [% END %] <!-- /items -->
256
                        </fieldset>
272
                        </fieldset>
257
                        [% END %] <!-- items -->
258
                      </div>
273
                      </div>
274
                      [% END %] <!-- items tab -->
259
                      <div id="accounting_details">
275
                      <div id="accounting_details">
260
                        <fieldset class="rows" style="float:none;">
276
                        <fieldset class="rows" style="float:none;">
261
                            <legend>Accounting details</legend>
277
                            <legend>Accounting details</legend>
Lines 264-269 Link Here
264
                                    <!-- origquantityrec only here for javascript compatibility (additem.js needs it, useless here, usefull when receiveing an order -->
280
                                    <!-- origquantityrec only here for javascript compatibility (additem.js needs it, useless here, usefull when receiveing an order -->
265
                                    <input id="origquantityrec" readonly="readonly" type="hidden" name="origquantityrec" value="1" />
281
                                    <input id="origquantityrec" readonly="readonly" type="hidden" name="origquantityrec" value="1" />
266
                                </li>
282
                                </li>
283
                                [% UNLESS is_order %]
267
                                <li>
284
                                <li>
268
                                    [% IF ( close ) %]
285
                                    [% IF ( close ) %]
269
                                        <span class="label">Fund: </span>
286
                                        <span class="label">Fund: </span>
Lines 295-304 Link Here
295
                                        </li>
312
                                        </li>
296
                                    [% END %]
313
                                    [% END %]
297
                                </li>
314
                                </li>
315
                                [% END %]
298
                                <li>
316
                                <li>
299
                                    <label for="notes">Notes: </label>
317
                                    <label for="notes">Notes: </label>
300
                                    <textarea id="notes" cols="30" rows="3" name="all_notes"></textarea>
318
                                    <textarea id="notes" cols="30" rows="3" name="all_notes"></textarea>
301
                                </li>
319
                                </li>
320
                                [% UNLESS is_order %]
302
                                <li>
321
                                <li>
303
                                    <div class="hint">The 2 following fields are available for your own usage. They can be useful for statistical purposes</div>
322
                                    <div class="hint">The 2 following fields are available for your own usage. They can be useful for statistical purposes</div>
304
                                    <label for="sort1">Planning value 1: </label>
323
                                    <label for="sort1">Planning value 1: </label>
Lines 334-347 Link Here
334
                                    [% END %]
353
                                    [% END %]
335
                                  </span>
354
                                  </span>
336
                                </li>
355
                                </li>
356
                                [% END %]
337
                            </ol>
357
                            </ol>
338
                        </fieldset>
358
                        </fieldset>
339
                      </div>
359
                      </div>
340
                      </div>
360
                      </div>
341
361
342
                      <fieldset class="action">
362
                        <fieldset class="action">
343
                          <input type="submit" value="Save" /><a class="cancel" href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basketno %]">Cancel</a>
363
                            <input type="hidden" name="is_order" value="[% is_order %]" />
344
                      </fieldset>
364
                            <input type="submit" value="Save" /><a class="cancel" href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basketno %]">Cancel</a>
365
                        </fieldset>
345
                    </form>
366
                    </form>
346
                [% ELSE %]
367
                [% ELSE %]
347
                <div>
368
                <div>
Lines 365-371 Link Here
365
                        <td>[% batch_lis.import_status %]</td>
386
                        <td>[% batch_lis.import_status %]</td>
366
                        <td>[% batch_lis.staged_date | $KohaDates %] [% batch_lis.staged_hour %]</td>
387
                        <td>[% batch_lis.staged_date | $KohaDates %] [% batch_lis.staged_hour %]</td>
367
                        <td>[% batch_lis.num_biblios %]</td>
388
                        <td>[% batch_lis.num_biblios %]</td>
368
                        <td><a href="[% batch_lis.scriptname %]?import_batch_id=[% batch_lis.import_batch_id %]&amp;basketno=[% basketno %]&amp;booksellerid=[% booksellerid %]">Add orders</a></td>
389
                        <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>
369
                      </tr>
390
                      </tr>
370
                      [% END %]
391
                      [% END %]
371
                    </tbody>
392
                    </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