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

(-)a/acqui/addorder.pl (-1 / +10 lines)
Lines 129-134 use C4::Biblio; # AddBiblio TransformKohaToMarc Link Here
129
use C4::Budgets;
129
use C4::Budgets;
130
use C4::Items;
130
use C4::Items;
131
use C4::Output;
131
use C4::Output;
132
use C4::Barcodes;
132
133
133
### "-------------------- addorder.pl ----------"
134
### "-------------------- addorder.pl ----------"
134
135
Lines 303-309 if ( $orderinfo->{quantity} ne '0' ) { Link Here
303
            push @{$itemhash{$itemid[$i]}->{'indicator'}},$indicator[$i];
304
            push @{$itemhash{$itemid[$i]}->{'indicator'}},$indicator[$i];
304
        }
305
        }
305
        foreach my $item (keys %itemhash){
306
        foreach my $item (keys %itemhash){
306
307
            my $xml = TransformHtmlToXml( $itemhash{$item}->{'tags'},
307
            my $xml = TransformHtmlToXml( $itemhash{$item}->{'tags'},
308
                                    $itemhash{$item}->{'subfields'},
308
                                    $itemhash{$item}->{'subfields'},
309
                                    $itemhash{$item}->{'field_values'},
309
                                    $itemhash{$item}->{'field_values'},
Lines 311-316 if ( $orderinfo->{quantity} ne '0' ) { Link Here
311
                                    $itemhash{$item}->{'ind_tag'},
311
                                    $itemhash{$item}->{'ind_tag'},
312
                                    'ITEM');
312
                                    'ITEM');
313
            my $record=MARC::Record::new_from_xml($xml, 'UTF-8');
313
            my $record=MARC::Record::new_from_xml($xml, 'UTF-8');
314
            my ($barcodefield,$barcodesubfield) = GetMarcFromKohaField('items.barcode');
315
            my $barcode = $record->subfield($barcodefield,$barcodesubfield);
316
            my $aBpref = C4::Context->preference('autoBarcode');
317
            if( $barcode eq '' && $aBpref ne 'OFF'){
318
                my $barcodeobj = C4::Barcodes->new;
319
                $barcode = $barcodeobj->next_value();
320
                $record->field($barcodefield)->delete_subfield( code => $barcodesubfield);
321
                $record->field($barcodefield)->add_subfields($barcodesubfield => $barcode);
322
            }
314
            my ($biblionumber,$bibitemnum,$itemnumber) = AddItemFromMarc($record,$$orderinfo{biblionumber});
323
            my ($biblionumber,$bibitemnum,$itemnumber) = AddItemFromMarc($record,$$orderinfo{biblionumber});
315
            $order->add_item($itemnumber);
324
            $order->add_item($itemnumber);
316
        }
325
        }
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt (-1 / +8 lines)
Lines 1-5 Link Here
1
[% USE KohaDates %]
1
[% USE KohaDates %]
2
[% INCLUDE 'doc-head-open.inc' %]
2
[% INCLUDE 'doc-head-open.inc' %]
3
[% USE Koha %]
3
<title>Koha &rsaquo; Acquisitions &rsaquo; Basket [% basketno %] &rsaquo; [% IF ( ordernumber ) %]Modify order details (line #[% ordernumber %])[% ELSE %]New order[% END %]</title>
4
<title>Koha &rsaquo; Acquisitions &rsaquo; Basket [% basketno %] &rsaquo; [% IF ( ordernumber ) %]Modify order details (line #[% ordernumber %])[% ELSE %]New order[% END %]</title>
4
[% INCLUDE 'doc-head-close.inc' %]
5
[% INCLUDE 'doc-head-close.inc' %]
5
6
Lines 451-456 $(document).ready(function() Link Here
451
              <div class="dialog message">No ACQ framework, using default. You should create a framework with code ACQ, the items framework would be used</div>
452
              <div class="dialog message">No ACQ framework, using default. You should create a framework with code ACQ, the items framework would be used</div>
452
          [% END %]
453
          [% END %]
453
454
455
          [% UNLESS Koha.Preference('autoBarcode') == 'OFF' %]
456
              <div class="dialog message">The autoBarcode system preference is set to [% Koha.Preference('autoBarcode') %] and items with blank barcodes will have barcodes generated upon save to database</div>
457
          [% END %]
458
454
          <div id="outeritemblock"></div>
459
          <div id="outeritemblock"></div>
455
460
456
      </fieldset>
461
      </fieldset>
Lines 657-662 $(document).ready(function() Link Here
657
        <li>[% uniqueField %]</li>
662
        <li>[% uniqueField %]</li>
658
    [% END %]
663
    [% END %]
659
    </ul>
664
    </ul>
665
    [% UNLESS Koha.Preference('autoBarcode') == 'OFF' %]
666
    <h3>If barcode is blank and/or listed in UniqueItemFields barcodes will be generate using the autoBarcode preference setting ([% Koha.Preference('autoBarcode') %]) when saved</h3>
667
    [% END %]
660
    </div>
668
    </div>
661
</div>
669
</div>
662
[% END %]
670
[% END %]
663
- 

Return to bug 14752