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

(-)a/acqui/addorderiso2709.pl (-14 / +18 lines)
Lines 143-149 if ($op eq ""){ Link Here
143
    my @sort2 = $input->multi_param('sort2');
143
    my @sort2 = $input->multi_param('sort2');
144
    my $matcher_id = $input->param('matcher_id');
144
    my $matcher_id = $input->param('matcher_id');
145
    my $active_currency = Koha::Acquisition::Currencies->get_active;
145
    my $active_currency = Koha::Acquisition::Currencies->get_active;
146
    my $biblio_count = 0;
146
    for my $biblio (@$biblios){
147
    for my $biblio (@$biblios){
148
        $biblio_count++;
147
        # Check if this import_record_id was selected
149
        # Check if this import_record_id was selected
148
        next if not grep { $_ eq $$biblio{import_record_id} } @import_record_id_selected;
150
        next if not grep { $_ eq $$biblio{import_record_id} } @import_record_id_selected;
149
        my ( $marcblob, $encoding ) = GetImportRecordMarc( $biblio->{'import_record_id'} );
151
        my ( $marcblob, $encoding ) = GetImportRecordMarc( $biblio->{'import_record_id'} );
Lines 197-215 if ($op eq ""){ Link Here
197
        }
199
        }
198
200
199
        # Add items from MarcItemFieldsToOrder
201
        # Add items from MarcItemFieldsToOrder
200
        my @homebranches = $input->multi_param('homebranch');
202
        my @homebranches = $input->multi_param('homebranch_' . $biblio_count);
201
        my $count = scalar @homebranches;
203
        my $count = scalar @homebranches;
202
        my @holdingbranches = $input->multi_param('holdingbranch');
204
        my @holdingbranches = $input->multi_param('holdingbranch_' . $biblio_count);
203
        my @itypes = $input->multi_param('itype');
205
        my @itypes = $input->multi_param('itype_' . $biblio_count);
204
        my @nonpublic_notes = $input->multi_param('nonpublic_note');
206
        my @nonpublic_notes = $input->multi_param('nonpublic_note_' . $biblio_count);
205
        my @public_notes = $input->multi_param('public_note');
207
        my @public_notes = $input->multi_param('public_note_' . $biblio_count);
206
        my @locs = $input->multi_param('loc');
208
        my @locs = $input->multi_param('loc_' . $biblio_count);
207
        my @ccodes = $input->multi_param('ccodes');
209
        my @ccodes = $input->multi_param('ccodes_' . $biblio_count);
208
        my @notforloans = $input->multi_param('notforloans');
210
        my @notforloans = $input->multi_param('notforloans_' . $biblio_count);
209
        my @uris = $input->multi_param('uri');
211
        my @uris = $input->multi_param('uri_' . $biblio_count);
210
        my @copynos = $input->multi_param('copyno');
212
        my @copynos = $input->multi_param('copyno_' . $biblio_count);
211
        my @budget_codes = $input->multi_param('budget_code');
213
        my @budget_codes = $input->multi_param('budget_code_' . $biblio_count);
212
        my @itemprices = $input->multi_param('itemprice');
214
        my @itemprices = $input->multi_param('itemprice_' . $biblio_count);
213
        my $itemcreation = 0;
215
        my $itemcreation = 0;
214
        for (my $i = 0; $i < $count; $i++) {
216
        for (my $i = 0; $i < $count; $i++) {
215
            $itemcreation = 1;
217
            $itemcreation = 1;
Lines 457-463 sub import_biblios_list { Link Here
457
    return () unless $batch and $batch->{import_status} =~ /^staged$|^reverted$/;
459
    return () unless $batch and $batch->{import_status} =~ /^staged$|^reverted$/;
458
    my $biblios = GetImportRecordsRange($import_batch_id,'','',$batch->{import_status});
460
    my $biblios = GetImportRecordsRange($import_batch_id,'','',$batch->{import_status});
459
    my @list = ();
461
    my @list = ();
460
    my $item_id = 1;
461
    my $item_error = 0;
462
    my $item_error = 0;
462
463
463
    my $ccodes    = GetKohaAuthorisedValues("items.ccode");
464
    my $ccodes    = GetKohaAuthorisedValues("items.ccode");
Lines 473-480 sub import_biblios_list { Link Here
473
    }
474
    }
474
475
475
476
476
477
    my $biblio_count = 0;
477
    foreach my $biblio (@$biblios) {
478
    foreach my $biblio (@$biblios) {
479
        my $item_id = 1;
480
        $biblio_count++;
478
        my $citation = $biblio->{'title'};
481
        my $citation = $biblio->{'title'};
479
        $citation .= " $biblio->{'author'}" if $biblio->{'author'};
482
        $citation .= " $biblio->{'author'}" if $biblio->{'author'};
480
        $citation .= " (" if $biblio->{'issn'} or $biblio->{'isbn'};
483
        $citation .= " (" if $biblio->{'issn'} or $biblio->{'isbn'};
Lines 536-541 sub import_biblios_list { Link Here
536
539
537
                    my %itemrecord = (
540
                    my %itemrecord = (
538
                        'item_id' => $item_id++,
541
                        'item_id' => $item_id++,
542
                        'biblio_count' => $biblio_count,
539
                        'homebranch' => $item_homebranch,
543
                        'homebranch' => $item_homebranch,
540
                        'holdingbranch' => $item_holdingbranch,
544
                        'holdingbranch' => $item_holdingbranch,
541
                        'itype' => $item_itype,
545
                        'itype' => $item_itype,
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt (-13 / +12 lines)
Lines 320-326 Link Here
320
                        <legend>Item Record [% item.item_id %]</legend>
320
                        <legend>Item Record [% item.item_id %]</legend>
321
                        <ol>
321
                        <ol>
322
                        <li>
322
                        <li>
323
                        <label for="homebranch_item_[% item.item_id %]">homebranch</label><select id="homebranch_item_[% item.item_id %]" name="homebranch">
323
                        <label for="homebranch_item_[% item.item_id %]">homebranch</label><select id="homebranch_item_[% item.item_id %]" name="homebranch_[% item.biblio_count %]">
324
                        [% FOREACH branchloo IN branchloop %]
324
                        [% FOREACH branchloo IN branchloop %]
325
                          [% IF ( branchloo.value ) == ( item.homebranch )  %]
325
                          [% IF ( branchloo.value ) == ( item.homebranch )  %]
326
                            <option value="[% branchloo.value %]" selected="selected">[% branchloo.branchname %]</option>
326
                            <option value="[% branchloo.value %]" selected="selected">[% branchloo.branchname %]</option>
Lines 331-337 Link Here
331
                        </select>
331
                        </select>
332
                        </li>
332
                        </li>
333
333
334
                        <li><label for="holdingbranch_item_[% item.item_id %]">holdingbranch</label><select id="holdingbranch_item_[% item.item_id %]" name="holdingbranch">
334
                        <li><label for="holdingbranch_item_[% item.item_id %]">holdingbranch</label><select id="holdingbranch_item_[% item.item_id %]" name="holdingbranch_[% item.biblio_count %]">
335
                        [% FOREACH branchloo IN branchloop %]
335
                        [% FOREACH branchloo IN branchloop %]
336
                          [% IF ( branchloo.value ) == ( item.holdingbranch ) %]
336
                          [% IF ( branchloo.value ) == ( item.holdingbranch ) %]
337
                            <option value="[% branchloo.value %]" selected="selected">[% branchloo.branchname %]</option>
337
                            <option value="[% branchloo.value %]" selected="selected">[% branchloo.branchname %]</option>
Lines 341-347 Link Here
341
                        [% END %]
341
                        [% END %]
342
                        </select>
342
                        </select>
343
                        </li>
343
                        </li>
344
                        <li><label for="itype_item_[% item.item_id %]">itype</label><select id="itype_item_[% item.item_id %]" name="itype">
344
                        <li><label for="itype_item_[% item.item_id %]">itype</label><select id="itype_item_[% item.item_id %]" name="itype_[% item.biblio_count %]">
345
                        [% FOREACH itypeloo IN itypeloop %]
345
                        [% FOREACH itypeloo IN itypeloop %]
346
                          [% IF ( itypeloo.value ) == ( item.itype ) %]
346
                          [% IF ( itypeloo.value ) == ( item.itype ) %]
347
                            <option value="[% itypeloo.itemtype %]" selected="selected">[% itypeloo.description |html %]</option>
347
                            <option value="[% itypeloo.itemtype %]" selected="selected">[% itypeloo.description |html %]</option>
Lines 352-360 Link Here
352
                        </select>
352
                        </select>
353
                        </li>
353
                        </li>
354
354
355
                        <li><label for="nonpublic_note_item_[% item.item_id %]">nonpublic_note</label><input type="text" id="nonpublic_note_item_[% item.item_id %]" name="nonpublic_note" value="[% item.nonpublic_note %]"></li>
355
                        <li><label for="nonpublic_note_item_[% item.item_id %]">nonpublic_note</label><input type="text" id="nonpublic_note_item_[% item.item_id %]" name="nonpublic_note_[% item.biblio_count %]" value="[% item.nonpublic_note %]"></li>
356
                        <li><label for="public_note_item_[% item.item_id %]">public_note</label><input type="text" id="public_note_item_[% item.item_id %]" name="public_note" value="[% item.public_note %]"></li>
356
                        <li><label for="public_note_item_[% item.item_id %]">public_note</label><input type="text" id="public_note_item_[% item.item_id %]" name="public_note_[% item.biblio_count %]" value="[% item.public_note %]"></li>
357
                        <li><label for="loc_item_[% item.item_id %]">loc</label><select id="loc_item_[% item.item_id %]" name="loc">
357
                        <li><label for="loc_item_[% item.item_id %]">loc</label><select id="loc_item_[% item.item_id %]" name="loc_[% item.biblio_count %]">
358
                        <option value=""> </option>
358
                        <option value=""> </option>
359
                        [% FOREACH locationloo IN locationloop %]
359
                        [% FOREACH locationloo IN locationloop %]
360
                            [% IF ( locationloo.code ) == (item.loc) %]<option value="[% locationloo.code %]" selected="selected">[% locationloo.description %]</option>[% ELSE %]<option value="[% locationloo.code %]">[% locationloo.description %]</option>[% END %]
360
                            [% IF ( locationloo.code ) == (item.loc) %]<option value="[% locationloo.code %]" selected="selected">[% locationloo.description %]</option>[% ELSE %]<option value="[% locationloo.code %]">[% locationloo.description %]</option>[% END %]
Lines 362-378 Link Here
362
                       </select>
362
                       </select>
363
                        </li>
363
                        </li>
364
364
365
                        <li><label for="ccode_item_[% item.item_id %]">ccode</label><select id="ccode_item_[% item.item_id %]" name="ccode">
365
                        <li><label for="ccode_item_[% item.item_id %]">ccode</label><select id="ccode_item_[% item.item_id %]" name="ccode_[% item.biblio_count %]">
366
                        [% FOREACH ccodeloo IN ccodeloop %]
366
                        [% FOREACH ccodeloo IN ccodeloop %]
367
                            [% IF ( ccodeloo.code ) == (item.ccode) %]<option value="[% ccodeloo.code %]" selected="selected">[% ccodeloo.description %]</option>[% ELSE %]<option value="[% ccodeloo.code %]">[% ccodeloo.description %]</option>[% END %]
367
                            [% IF ( ccodeloo.code ) == (item.ccode) %]<option value="[% ccodeloo.code %]" selected="selected">[% ccodeloo.description %]</option>[% ELSE %]<option value="[% ccodeloo.code %]">[% ccodeloo.description %]</option>[% END %]
368
                        [% END %]
368
                        [% END %]
369
                        </select>
369
                        </select>
370
                        </li>
370
                        </li>
371
371
372
                        <li><label for="notforloan_item_[% item.item_id %]">notforloan</label><input type="text" id="notforloan_item_[% item.item_id %]" name="notforloan" value="[% item.notforloan %]"></li>
372
                        <li><label for="notforloan_item_[% item.item_id %]">notforloan</label><input type="text" id="notforloan_item_[% item.item_id %]" name="notforloan_[% item.biblio_count %]" value="[% item.notforloan %]"></li>
373
                        <li><label for="uri_item_[% item.item_id %]">uri</label><input type="text" id="uri_item_[% item.item_id %]" name="uri" value="[% item.uri %]"></li>
373
                        <li><label for="uri_item_[% item.item_id %]">uri</label><input type="text" id="uri_item_[% item.item_id %]" name="uri_[% item.biblio_count %]" value="[% item.uri %]"></li>
374
                        <li><label for="copyno_item_[% item.item_id %]">copyno</label><input type="text" id="copyno_item_[% item.item_id %]" name="copyno" value="[% item.copyno %]"></li>
374
                        <li><label for="copyno_item_[% item.item_id %]">copyno</label><input type="text" id="copyno_item_[% item.item_id %]" name="copyno_[% item.biblio_count %]" value="[% item.copyno %]"></li>
375
                        <li><label for="budget_code_item_[% item.item_id %]">budget_code</label><select id="budget_code_item_[% item.item_id %]" name="budget_code">
375
                        <li><label for="budget_code_item_[% item.item_id %]">budget_code</label><select id="budget_code_item_[% item.item_id %]" name="budget_code_[% item.biblio_count %]">
376
                        <option value="">Select a fund</option>
376
                        <option value="">Select a fund</option>
377
                        [% FOREACH budget_loo IN budget_loop %]
377
                        [% FOREACH budget_loo IN budget_loop %]
378
                            [% IF ( budget_loo.b_code ) == ( item.budget_code ) %]<option value="[% budget_loo.b_id %]" selected="selected">[% budget_loo.b_txt %]</option>
378
                            [% IF ( budget_loo.b_code ) == ( item.budget_code ) %]<option value="[% budget_loo.b_id %]" selected="selected">[% budget_loo.b_txt %]</option>
Lines 381-387 Link Here
381
                        [% END %]
381
                        [% END %]
382
                        </select>
382
                        </select>
383
                        </li>
383
                        </li>
384
                        <li><label for="price_item_[% item.item_id %]">price</label><input type="text" id="price_item_[% item.item_id %]" name="itemprice" value="[% item.itemprice %]"></li>
384
                        <li><label for="price_item_[% item.item_id %]">price</label><input type="text" id="price_item_[% item.item_id %]" name="itemprice_[% item.biblio_count %]" value="[% item.itemprice %]"></li>
385
                        </ol>
385
                        </ol>
386
                        </fieldset>
386
                        </fieldset>
387
                        [% END %]
387
                        [% END %]
388
- 

Return to bug 15503