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

(-)a/cataloguing/additem.pl (-3 / +13 lines)
Lines 439-444 if ($prefillitem) { Link Here
439
    }
439
    }
440
}
440
}
441
441
442
#---- finds where items.homebranch is stored
443
my ($branchtagfield, $branchtagsubfield) = &GetMarcFromKohaField("items.homebranch", $frameworkcode);
444
442
#-------------------------------------------------------------------------------
445
#-------------------------------------------------------------------------------
443
if ($op eq "additem") {
446
if ($op eq "additem") {
444
447
Lines 527-535 if ($op eq "additem") { Link Here
527
    if ($add_multiple_copies_submit) {
530
    if ($add_multiple_copies_submit) {
528
531
529
        use C4::Barcodes;
532
        use C4::Barcodes;
530
        my $barcodeobj = C4::Barcodes->new;
531
        my $oldbarcode = $addedolditem->{'barcode'};
533
        my $oldbarcode = $addedolditem->{'barcode'};
532
        my ($tagfield,$tagsubfield) = &GetMarcFromKohaField("items.barcode",$frameworkcode);
534
        my ($tagfield,$tagsubfield) = &GetMarcFromKohaField("items.barcode",$frameworkcode);
535
        my $barcodeobj;
536
        if ( C4::Context->preference('autoBarcode') eq 'hbyymmincr' ) {
537
            my $record_branch =
538
            $record
539
                ->field($branchtagfield)
540
                ->subfield($branchtagsubfield);
541
            $barcodeobj = C4::Barcodes->new('hbyymmincr', $record_branch);
542
        } else {
543
            $barcodeobj = C4::Barcodes->new();
544
        }
533
545
534
    # If there is a barcode and we can't find their new values, we can't add multiple copies
546
    # If there is a barcode and we can't find their new values, we can't add multiple copies
535
	my $testbarcode;
547
	my $testbarcode;
Lines 733-739 my %witness; #---- stores the list of subfields used at least once, with the "me Link Here
733
my @big_array;
745
my @big_array;
734
#---- finds where items.itemnumber is stored
746
#---- finds where items.itemnumber is stored
735
my (  $itemtagfield,   $itemtagsubfield) = &GetMarcFromKohaField("items.itemnumber", $frameworkcode);
747
my (  $itemtagfield,   $itemtagsubfield) = &GetMarcFromKohaField("items.itemnumber", $frameworkcode);
736
my ($branchtagfield, $branchtagsubfield) = &GetMarcFromKohaField("items.homebranch", $frameworkcode);
737
C4::Biblio::EmbedItemsInMarcBiblio($temp, $biblionumber);
748
C4::Biblio::EmbedItemsInMarcBiblio($temp, $biblionumber);
738
my @fields = $temp->fields();
749
my @fields = $temp->fields();
739
750
740
- 

Return to bug 15239