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

(-)a/acqui/addorderiso2709.pl (-14 / +18 lines)
Lines 142-148 if ($op eq ""){ Link Here
142
    my @sort1 = $input->multi_param('sort1');
142
    my @sort1 = $input->multi_param('sort1');
143
    my @sort2 = $input->multi_param('sort2');
143
    my @sort2 = $input->multi_param('sort2');
144
    my $active_currency = Koha::Acquisition::Currencies->get_active;
144
    my $active_currency = Koha::Acquisition::Currencies->get_active;
145
    my $biblio_count = 0;
145
    for my $biblio (@$biblios){
146
    for my $biblio (@$biblios){
147
        $biblio_count++;
146
        # Check if this import_record_id was selected
148
        # Check if this import_record_id was selected
147
        next if not grep { $_ eq $$biblio{import_record_id} } @import_record_id_selected;
149
        next if not grep { $_ eq $$biblio{import_record_id} } @import_record_id_selected;
148
        my ( $marcblob, $encoding ) = GetImportRecordMarc( $biblio->{'import_record_id'} );
150
        my ( $marcblob, $encoding ) = GetImportRecordMarc( $biblio->{'import_record_id'} );
Lines 184-202 if ($op eq ""){ Link Here
184
        }
186
        }
185
187
186
        # Add items from MarcItemFieldsToOrder
188
        # Add items from MarcItemFieldsToOrder
187
        my @homebranches = $input->multi_param('homebranch');
189
        my @homebranches = $input->multi_param('homebranch_' . $biblio_count);
188
        my $count = scalar @homebranches;
190
        my $count = scalar @homebranches;
189
        my @holdingbranches = $input->multi_param('holdingbranch');
191
        my @holdingbranches = $input->multi_param('holdingbranch_' . $biblio_count);
190
        my @itypes = $input->multi_param('itype');
192
        my @itypes = $input->multi_param('itype_' . $biblio_count);
191
        my @nonpublic_notes = $input->multi_param('nonpublic_note');
193
        my @nonpublic_notes = $input->multi_param('nonpublic_note_' . $biblio_count);
192
        my @public_notes = $input->multi_param('public_note');
194
        my @public_notes = $input->multi_param('public_note_' . $biblio_count);
193
        my @locs = $input->multi_param('loc');
195
        my @locs = $input->multi_param('loc_' . $biblio_count);
194
        my @ccodes = $input->multi_param('ccodes');
196
        my @ccodes = $input->multi_param('ccodes_' . $biblio_count);
195
        my @notforloans = $input->multi_param('notforloans');
197
        my @notforloans = $input->multi_param('notforloans_' . $biblio_count);
196
        my @uris = $input->multi_param('uri');
198
        my @uris = $input->multi_param('uri_' . $biblio_count);
197
        my @copynos = $input->multi_param('copyno');
199
        my @copynos = $input->multi_param('copyno_' . $biblio_count);
198
        my @budget_codes = $input->multi_param('budget_code');
200
        my @budget_codes = $input->multi_param('budget_code_' . $biblio_count);
199
        my @itemprices = $input->multi_param('itemprice');
201
        my @itemprices = $input->multi_param('itemprice_' . $biblio_count);
200
        my $itemcreation = 0;
202
        my $itemcreation = 0;
201
        for (my $i = 0; $i < $count; $i++) {
203
        for (my $i = 0; $i < $count; $i++) {
202
            $itemcreation = 1;
204
            $itemcreation = 1;
Lines 433-439 sub import_biblios_list { Link Here
433
    return () unless $batch and $batch->{import_status} =~ /^staged$|^reverted$/;
435
    return () unless $batch and $batch->{import_status} =~ /^staged$|^reverted$/;
434
    my $biblios = GetImportRecordsRange($import_batch_id,'','',$batch->{import_status});
436
    my $biblios = GetImportRecordsRange($import_batch_id,'','',$batch->{import_status});
435
    my @list = ();
437
    my @list = ();
436
    my $item_id = 1;
437
    my $item_error = 0;
438
    my $item_error = 0;
438
439
439
    my $ccodes    = GetKohaAuthorisedValues("items.ccode");
440
    my $ccodes    = GetKohaAuthorisedValues("items.ccode");
Lines 449-456 sub import_biblios_list { Link Here
449
    }
450
    }
450
451
451
452
452
453
    my $biblio_count = 0;
453
    foreach my $biblio (@$biblios) {
454
    foreach my $biblio (@$biblios) {
455
        my $item_id = 1;
456
        $biblio_count++;
454
        my $citation = $biblio->{'title'};
457
        my $citation = $biblio->{'title'};
455
        $citation .= " $biblio->{'author'}" if $biblio->{'author'};
458
        $citation .= " $biblio->{'author'}" if $biblio->{'author'};
456
        $citation .= " (" if $biblio->{'issn'} or $biblio->{'isbn'};
459
        $citation .= " (" if $biblio->{'issn'} or $biblio->{'isbn'};
Lines 512-517 sub import_biblios_list { Link Here
512
515
513
                    my %itemrecord = (
516
                    my %itemrecord = (
514
                        'item_id' => $item_id++,
517
                        'item_id' => $item_id++,
518
                        'biblio_count' => $biblio_count,
515
                        'homebranch' => $item_homebranch,
519
                        'homebranch' => $item_homebranch,
516
                        'holdingbranch' => $item_holdingbranch,
520
                        'holdingbranch' => $item_holdingbranch,
517
                        'itype' => $item_itype,
521
                        'itype' => $item_itype,
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt (-13 / +12 lines)
Lines 292-298 Link Here
292
                        <legend>Item Record [% item.item_id %]</legend>
292
                        <legend>Item Record [% item.item_id %]</legend>
293
                        <ol>
293
                        <ol>
294
                        <li>
294
                        <li>
295
                        <label for="homebranch_item_[% item.item_id %]">homebranch</label><select id="homebranch_item_[% item.item_id %]" name="homebranch">
295
                        <label for="homebranch_item_[% item.item_id %]">homebranch</label><select id="homebranch_item_[% item.item_id %]" name="homebranch_[% item.biblio_count %]">
296
                        [% FOREACH branchloo IN branchloop %]
296
                        [% FOREACH branchloo IN branchloop %]
297
                          [% IF ( branchloo.value ) == ( item.homebranch )  %]
297
                          [% IF ( branchloo.value ) == ( item.homebranch )  %]
298
                            <option value="[% branchloo.value %]" selected="selected">[% branchloo.branchname %]</option>
298
                            <option value="[% branchloo.value %]" selected="selected">[% branchloo.branchname %]</option>
Lines 303-309 Link Here
303
                        </select>
303
                        </select>
304
                        </li>
304
                        </li>
305
305
306
                        <li><label for="holdingbranch_item_[% item.item_id %]">holdingbranch</label><select id="holdingbranch_item_[% item.item_id %]" name="holdingbranch">
306
                        <li><label for="holdingbranch_item_[% item.item_id %]">holdingbranch</label><select id="holdingbranch_item_[% item.item_id %]" name="holdingbranch_[% item.biblio_count %]">
307
                        [% FOREACH branchloo IN branchloop %]
307
                        [% FOREACH branchloo IN branchloop %]
308
                          [% IF ( branchloo.value ) == ( item.holdingbranch ) %]
308
                          [% IF ( branchloo.value ) == ( item.holdingbranch ) %]
309
                            <option value="[% branchloo.value %]" selected="selected">[% branchloo.branchname %]</option>
309
                            <option value="[% branchloo.value %]" selected="selected">[% branchloo.branchname %]</option>
Lines 313-319 Link Here
313
                        [% END %]
313
                        [% END %]
314
                        </select>
314
                        </select>
315
                        </li>
315
                        </li>
316
                        <li><label for="itype_item_[% item.item_id %]">itype</label><select id="itype_item_[% item.item_id %]" name="itype">
316
                        <li><label for="itype_item_[% item.item_id %]">itype</label><select id="itype_item_[% item.item_id %]" name="itype_[% item.biblio_count %]">
317
                        [% FOREACH itypeloo IN itypeloop %]
317
                        [% FOREACH itypeloo IN itypeloop %]
318
                          [% IF ( itypeloo.value ) == ( item.itype ) %]
318
                          [% IF ( itypeloo.value ) == ( item.itype ) %]
319
                            <option value="[% itypeloo.itemtype %]" selected="selected">[% itypeloo.description |html %]</option>
319
                            <option value="[% itypeloo.itemtype %]" selected="selected">[% itypeloo.description |html %]</option>
Lines 324-332 Link Here
324
                        </select>
324
                        </select>
325
                        </li>
325
                        </li>
326
326
327
                        <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>
327
                        <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>
328
                        <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>
328
                        <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>
329
                        <li><label for="loc_item_[% item.item_id %]">loc</label><select id="loc_item_[% item.item_id %]" name="loc">
329
                        <li><label for="loc_item_[% item.item_id %]">loc</label><select id="loc_item_[% item.item_id %]" name="loc_[% item.biblio_count %]">
330
                        <option value=""> </option>
330
                        <option value=""> </option>
331
                        [% FOREACH locationloo IN locationloop %]
331
                        [% FOREACH locationloo IN locationloop %]
332
                            [% IF ( locationloo.code ) == (item.loc) %]<option value="[% locationloo.code %]" selected="selected">[% locationloo.description %]</option>[% ELSE %]<option value="[% locationloo.code %]">[% locationloo.description %]</option>[% END %]
332
                            [% IF ( locationloo.code ) == (item.loc) %]<option value="[% locationloo.code %]" selected="selected">[% locationloo.description %]</option>[% ELSE %]<option value="[% locationloo.code %]">[% locationloo.description %]</option>[% END %]
Lines 334-350 Link Here
334
                       </select>
334
                       </select>
335
                        </li>
335
                        </li>
336
336
337
                        <li><label for="ccode_item_[% item.item_id %]">ccode</label><select id="ccode_item_[% item.item_id %]" name="ccode">
337
                        <li><label for="ccode_item_[% item.item_id %]">ccode</label><select id="ccode_item_[% item.item_id %]" name="ccode_[% item.biblio_count %]">
338
                        [% FOREACH ccodeloo IN ccodeloop %]
338
                        [% FOREACH ccodeloo IN ccodeloop %]
339
                            [% IF ( ccodeloo.code ) == (item.ccode) %]<option value="[% ccodeloo.code %]" selected="selected">[% ccodeloo.description %]</option>[% ELSE %]<option value="[% ccodeloo.code %]">[% ccodeloo.description %]</option>[% END %]
339
                            [% IF ( ccodeloo.code ) == (item.ccode) %]<option value="[% ccodeloo.code %]" selected="selected">[% ccodeloo.description %]</option>[% ELSE %]<option value="[% ccodeloo.code %]">[% ccodeloo.description %]</option>[% END %]
340
                        [% END %]
340
                        [% END %]
341
                        </select>
341
                        </select>
342
                        </li>
342
                        </li>
343
343
344
                        <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>
344
                        <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>
345
                        <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>
345
                        <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>
346
                        <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>
346
                        <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>
347
                        <li><label for="budget_code_item_[% item.item_id %]">budget_code</label><select id="budget_code_item_[% item.item_id %]" name="budget_code">
347
                        <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 %]">
348
                        <option value="">Select a fund</option>
348
                        <option value="">Select a fund</option>
349
                        [% FOREACH budget_loo IN budget_loop %]
349
                        [% FOREACH budget_loo IN budget_loop %]
350
                            [% IF ( budget_loo.b_code ) == ( item.budget_code ) %]<option value="[% budget_loo.b_id %]" selected="selected">[% budget_loo.b_txt %]</option>
350
                            [% IF ( budget_loo.b_code ) == ( item.budget_code ) %]<option value="[% budget_loo.b_id %]" selected="selected">[% budget_loo.b_txt %]</option>
Lines 353-359 Link Here
353
                        [% END %]
353
                        [% END %]
354
                        </select>
354
                        </select>
355
                        </li>
355
                        </li>
356
                        <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>
356
                        <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>
357
                        </ol>
357
                        </ol>
358
                        </fieldset>
358
                        </fieldset>
359
                        [% END %]
359
                        [% END %]
360
- 

Return to bug 15503