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

(-)a/acqui/addorder.pl (-6 / +2 lines)
Lines 360-367 if ( $basket->{is_standing} || $orderinfo->{quantity} ne '0' ) { Link Here
360
        my @field_values = $input->multi_param('field_value');
360
        my @field_values = $input->multi_param('field_value');
361
        my @serials      = $input->multi_param('serial');
361
        my @serials      = $input->multi_param('serial');
362
        my @itemid       = $input->multi_param('itemid');
362
        my @itemid       = $input->multi_param('itemid');
363
        my @ind_tag      = $input->multi_param('ind_tag');
364
        my @indicator    = $input->multi_param('indicator');
365
        #Rebuilding ALL the data for items into a hash
363
        #Rebuilding ALL the data for items into a hash
366
        # parting them on $itemid.
364
        # parting them on $itemid.
367
365
Lines 375-389 if ( $basket->{is_standing} || $orderinfo->{quantity} ne '0' ) { Link Here
375
        push @{$itemhash{$itemid[$i]}->{'tags'}},$tags[$i];
373
        push @{$itemhash{$itemid[$i]}->{'tags'}},$tags[$i];
376
        push @{$itemhash{$itemid[$i]}->{'subfields'}},$subfields[$i];
374
        push @{$itemhash{$itemid[$i]}->{'subfields'}},$subfields[$i];
377
            push @{$itemhash{$itemid[$i]}->{'field_values'}},$field_values[$i];
375
            push @{$itemhash{$itemid[$i]}->{'field_values'}},$field_values[$i];
378
            push @{$itemhash{$itemid[$i]}->{'ind_tag'}},$ind_tag[$i];
379
            push @{$itemhash{$itemid[$i]}->{'indicator'}},$indicator[$i];
380
        }
376
        }
381
        foreach my $item (keys %itemhash){
377
        foreach my $item (keys %itemhash){
382
            my $xml = TransformHtmlToXml( $itemhash{$item}->{'tags'},
378
            my $xml = TransformHtmlToXml( $itemhash{$item}->{'tags'},
383
                                    $itemhash{$item}->{'subfields'},
379
                                    $itemhash{$item}->{'subfields'},
384
                                    $itemhash{$item}->{'field_values'},
380
                                    $itemhash{$item}->{'field_values'},
385
                                    $itemhash{$item}->{'indicator'},
381
                                    undef,
386
                                    $itemhash{$item}->{'ind_tag'},
382
                                    undef,
387
                                    'ITEM');
383
                                    'ITEM');
388
            my $record=MARC::Record::new_from_xml($xml, 'UTF-8');
384
            my $record=MARC::Record::new_from_xml($xml, 'UTF-8');
389
            my ($barcodefield,$barcodesubfield) = GetMarcFromKohaField('items.barcode');
385
            my ($barcodefield,$barcodesubfield) = GetMarcFromKohaField('items.barcode');
(-)a/acqui/addorderiso2709.pl (-3 / +1 lines)
Lines 376-384 if ($op eq ""){ Link Here
376
            my @subfields    = $input->multi_param('subfield');
376
            my @subfields    = $input->multi_param('subfield');
377
            my @field_values = $input->multi_param('field_value');
377
            my @field_values = $input->multi_param('field_value');
378
            my @serials      = $input->multi_param('serial');
378
            my @serials      = $input->multi_param('serial');
379
            my @ind_tag   = $input->multi_param('ind_tag');
379
            my $xml = TransformHtmlToXml( \@tags, \@subfields, \@field_values );
380
            my @indicator = $input->multi_param('indicator');
381
            my $xml = TransformHtmlToXml( \@tags, \@subfields, \@field_values, \@indicator, \@ind_tag );
382
            my $record = MARC::Record::new_from_xml( $xml, 'UTF-8' );
380
            my $record = MARC::Record::new_from_xml( $xml, 'UTF-8' );
383
            for (my $qtyloop=1;$qtyloop <= $c_quantity;$qtyloop++) {
381
            for (my $qtyloop=1;$qtyloop <= $c_quantity;$qtyloop++) {
384
                my ( $biblionumber, $bibitemnum, $itemnumber ) = AddItemFromMarc( $record, $biblionumber );
382
                my ( $biblionumber, $bibitemnum, $itemnumber ) = AddItemFromMarc( $record, $biblionumber );
(-)a/acqui/finishreceive.pl (-6 / +2 lines)
Lines 139-146 if ($quantityrec > $origquantityrec ) { Link Here
139
        my @field_values = $input->multi_param('field_value');
139
        my @field_values = $input->multi_param('field_value');
140
        my @serials      = $input->multi_param('serial');
140
        my @serials      = $input->multi_param('serial');
141
        my @itemid       = $input->multi_param('itemid');
141
        my @itemid       = $input->multi_param('itemid');
142
        my @ind_tag      = $input->multi_param('ind_tag');
143
        my @indicator    = $input->multi_param('indicator');
144
        #Rebuilding ALL the data for items into a hash
142
        #Rebuilding ALL the data for items into a hash
145
        # parting them on $itemid.
143
        # parting them on $itemid.
146
        my %itemhash;
144
        my %itemhash;
Lines 153-168 if ($quantityrec > $origquantityrec ) { Link Here
153
            push @{$itemhash{$itemid[$i]}->{'tags'}},$tags[$i];
151
            push @{$itemhash{$itemid[$i]}->{'tags'}},$tags[$i];
154
            push @{$itemhash{$itemid[$i]}->{'subfields'}},$subfields[$i];
152
            push @{$itemhash{$itemid[$i]}->{'subfields'}},$subfields[$i];
155
            push @{$itemhash{$itemid[$i]}->{'field_values'}},$field_values[$i];
153
            push @{$itemhash{$itemid[$i]}->{'field_values'}},$field_values[$i];
156
            push @{$itemhash{$itemid[$i]}->{'ind_tag'}},$ind_tag[$i];
157
            push @{$itemhash{$itemid[$i]}->{'indicator'}},$indicator[$i];
158
        }
154
        }
159
        my $new_order = Koha::Acquisition::Orders->find( $new_ordernumber );
155
        my $new_order = Koha::Acquisition::Orders->find( $new_ordernumber );
160
        foreach my $item (keys %itemhash){
156
        foreach my $item (keys %itemhash){
161
            my $xml = TransformHtmlToXml( $itemhash{$item}->{'tags'},
157
            my $xml = TransformHtmlToXml( $itemhash{$item}->{'tags'},
162
                                          $itemhash{$item}->{'subfields'},
158
                                          $itemhash{$item}->{'subfields'},
163
                                          $itemhash{$item}->{'field_values'},
159
                                          $itemhash{$item}->{'field_values'},
164
                                          $itemhash{$item}->{'indicator'},
160
                                          undef,
165
                                          $itemhash{$item}->{'ind_tag'},
161
                                          undef,
166
                                          'ITEM' );
162
                                          'ITEM' );
167
            my $record=MARC::Record::new_from_xml($xml, 'UTF-8');
163
            my $record=MARC::Record::new_from_xml($xml, 'UTF-8');
168
            my (undef,$bibitemnum,$itemnumber) = AddItemFromMarc($record,$biblionumber);
164
            my (undef,$bibitemnum,$itemnumber) = AddItemFromMarc($record,$biblionumber);
(-)a/cataloguing/additem.pl (-8 / +2 lines)
Lines 492-501 if ($op eq "additem") { Link Here
492
    my @tags      = $input->multi_param('tag');
492
    my @tags      = $input->multi_param('tag');
493
    my @subfields = $input->multi_param('subfield');
493
    my @subfields = $input->multi_param('subfield');
494
    my @values    = $input->multi_param('field_value');
494
    my @values    = $input->multi_param('field_value');
495
    # build indicator hash.
495
    my $xml = TransformHtmlToXml(\@tags,\@subfields,\@values,undef,undef, 'ITEM');
496
    my @ind_tag   = $input->multi_param('ind_tag');
497
    my @indicator = $input->multi_param('indicator');
498
    my $xml = TransformHtmlToXml(\@tags,\@subfields,\@values,\@indicator,\@ind_tag, 'ITEM');
499
    my $record = MARC::Record::new_from_xml($xml, 'UTF-8');
496
    my $record = MARC::Record::new_from_xml($xml, 'UTF-8');
500
497
501
    # type of add
498
    # type of add
Lines 745-755 if ($op eq "additem") { Link Here
745
    my @tags      = $input->multi_param('tag');
742
    my @tags      = $input->multi_param('tag');
746
    my @subfields = $input->multi_param('subfield');
743
    my @subfields = $input->multi_param('subfield');
747
    my @values    = $input->multi_param('field_value');
744
    my @values    = $input->multi_param('field_value');
748
    # build indicator hash.
749
    my @ind_tag   = $input->multi_param('ind_tag');
750
    my @indicator = $input->multi_param('indicator');
751
    # my $itemnumber = $input->param('itemnumber');
745
    # my $itemnumber = $input->param('itemnumber');
752
    my $xml = TransformHtmlToXml(\@tags,\@subfields,\@values,\@indicator,\@ind_tag,'ITEM');
746
    my $xml = TransformHtmlToXml(\@tags,\@subfields,\@values,undef,undef,'ITEM');
753
    my $itemtosave=MARC::Record::new_from_xml($xml, 'UTF-8');
747
    my $itemtosave=MARC::Record::new_from_xml($xml, 'UTF-8');
754
    # MARC::Record builded => now, record in DB
748
    # MARC::Record builded => now, record in DB
755
    # warn "R: ".$record->as_formatted;
749
    # warn "R: ".$record->as_formatted;
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt (-2 lines)
Lines 238-245 Link Here
238
        [% END %]
238
        [% END %]
239
    </ol>
239
    </ol>
240
    </fieldset>
240
    </fieldset>
241
    <input type="hidden" name="indicator" value=" " />
242
    <input type="hidden" name="indicator" value=" " />
243
    <input type="hidden" name="itemnumber" value="[% itemnumber | html %]" />
241
    <input type="hidden" name="itemnumber" value="[% itemnumber | html %]" />
244
242
245
<fieldset class="action">    [% IF op != 'saveitem' %]
243
<fieldset class="action">    [% IF op != 'saveitem' %]
(-)a/serials/serials-edit.pl (-6 / +2 lines)
Lines 285-292 if ( $op and $op eq 'serialchangestatus' ) { Link Here
285
        my @serials      = $query->multi_param('serial');
285
        my @serials      = $query->multi_param('serial');
286
        my @bibnums      = $query->multi_param('bibnum');
286
        my @bibnums      = $query->multi_param('bibnum');
287
        my @itemid       = $query->multi_param('itemid');
287
        my @itemid       = $query->multi_param('itemid');
288
        my @ind_tag      = $query->multi_param('ind_tag');
289
        my @indicator    = $query->multi_param('indicator');
290
        my @num_copies   = $query->multi_param('number_of_copies');
288
        my @num_copies   = $query->multi_param('number_of_copies');
291
289
292
        #Rebuilding ALL the data for items into a hash
290
        #Rebuilding ALL the data for items into a hash
Lines 313-320 if ( $op and $op eq 'serialchangestatus' ) { Link Here
313
            push @{ $itemhash{ $itemid[$i] }->{'subfields'} }, $subfields[$i];
311
            push @{ $itemhash{ $itemid[$i] }->{'subfields'} }, $subfields[$i];
314
            push @{ $itemhash{ $itemid[$i] }->{'field_values'} },
312
            push @{ $itemhash{ $itemid[$i] }->{'field_values'} },
315
              $field_values[$i];
313
              $field_values[$i];
316
            push @{ $itemhash{ $itemid[$i] }->{'ind_tag'} },   $ind_tag[$i];
317
            push @{ $itemhash{ $itemid[$i] }->{'indicator'} }, $indicator[$i];
318
        }
314
        }
319
        foreach my $item ( keys %itemhash ) {
315
        foreach my $item ( keys %itemhash ) {
320
316
Lines 334-341 if ( $op and $op eq 'serialchangestatus' ) { Link Here
334
                    $itemhash{$item}->{'tags'},
330
                    $itemhash{$item}->{'tags'},
335
                    $itemhash{$item}->{'subfields'},
331
                    $itemhash{$item}->{'subfields'},
336
                    $itemhash{$item}->{'field_values'},
332
                    $itemhash{$item}->{'field_values'},
337
                    $itemhash{$item}->{'indicator'},
333
                    undef,
338
                    $itemhash{$item}->{'ind_tag'}
334
                    undef
339
                );
335
                );
340
336
341
                # warn $xml;
337
                # warn $xml;
(-)a/tools/batchMod.pl (-5 / +1 lines)
Lines 117-125 if ($op eq "action") { Link Here
117
    my @replaces  = $input->multi_param('regex_replace');
117
    my @replaces  = $input->multi_param('regex_replace');
118
    my @modifiers = $input->multi_param('regex_modifiers');
118
    my @modifiers = $input->multi_param('regex_modifiers');
119
    my @disabled  = $input->multi_param('disable_input');
119
    my @disabled  = $input->multi_param('disable_input');
120
    # build indicator hash.
121
    my @ind_tag   = $input->multi_param('ind_tag');
122
    my @indicator = $input->multi_param('indicator');
123
120
124
    # Is there something to modify ?
121
    # Is there something to modify ?
125
    # TODO : We shall use this var to warn the user in case no modification was done to the items
122
    # TODO : We shall use this var to warn the user in case no modification was done to the items
Lines 131-137 if ($op eq "action") { Link Here
131
    #initializing values for updates
128
    #initializing values for updates
132
    my (  $itemtagfield,   $itemtagsubfield) = &GetMarcFromKohaField( "items.itemnumber" );
129
    my (  $itemtagfield,   $itemtagsubfield) = &GetMarcFromKohaField( "items.itemnumber" );
133
    if ($values_to_modify){
130
    if ($values_to_modify){
134
        my $xml = TransformHtmlToXml(\@tags,\@subfields,\@values,\@indicator,\@ind_tag, 'ITEM');
131
        my $xml = TransformHtmlToXml(\@tags,\@subfields,\@values,undef,undef, 'ITEM');
135
        $marcitem = MARC::Record::new_from_xml($xml, 'UTF-8');
132
        $marcitem = MARC::Record::new_from_xml($xml, 'UTF-8');
136
    }
133
    }
137
    if ($values_to_blank){
134
    if ($values_to_blank){
138
- 

Return to bug 29111