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

(-)a/cataloguing/additem.pl (-4 / +3 lines)
Lines 632-645 if ($op eq "additem") { Link Here
632
} elsif ($op eq "dupeitem") {
632
} elsif ($op eq "dupeitem") {
633
#-------------------------------------------------------------------------------
633
#-------------------------------------------------------------------------------
634
# retrieve item if exist => then, it's a modif
634
# retrieve item if exist => then, it's a modif
635
    my $item = Koha::Items->find($itemnumber);
635
    $current_item = Koha::Items->find($itemnumber)->unblessed;
636
    # FIXME Handle non existent item
636
    # FIXME Handle non existent item
637
    if (C4::Context->preference('autoBarcode') eq 'incremental') {
637
    if (C4::Context->preference('autoBarcode') eq 'incremental') {
638
        my ( $barcode ) = C4::Barcodes::ValueBuilder::incremental::get_barcode;
638
        my ( $barcode ) = C4::Barcodes::ValueBuilder::incremental::get_barcode;
639
        $item->barcode($barcode);
639
        $current_item->{barcode} = $barcode;
640
    }
640
    }
641
    else {
641
    else {
642
        $item->barcode(undef); # Don't save it!
642
        $current_item->{barcode} = undef; # Don't save it!
643
    }
643
    }
644
644
645
    $nextop = "additem";
645
    $nextop = "additem";
646
- 

Return to bug 27526