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

(-)a/cataloguing/additem.pl (-2 / +6 lines)
Lines 424-429 my $prefillitem = C4::Context->preference('PrefillItem'); Link Here
424
if ($op eq "additem") {
424
if ($op eq "additem") {
425
425
426
    my $add_submit                 = $input->param('add_submit');
426
    my $add_submit                 = $input->param('add_submit');
427
    my $add_duplicate_submit       = $input->param('add_duplicate_submit');
427
    my $add_multiple_copies_submit = $input->param('add_multiple_copies_submit');
428
    my $add_multiple_copies_submit = $input->param('add_multiple_copies_submit');
428
    my $number_of_copies           = $input->param('number_of_copies');
429
    my $number_of_copies           = $input->param('number_of_copies');
429
430
Lines 499-505 if ($op eq "additem") { Link Here
499
    }
500
    }
500
501
501
    # If we have to add & duplicate
502
    # If we have to add & duplicate
502
    if ($prefillitem) {
503
    if ($prefillitem || $add_duplicate_submit) {
503
504
504
        $current_item = $item->unblessed;
505
        $current_item = $item->unblessed;
505
506
Lines 511-516 if ($op eq "additem") { Link Here
511
            # we have to clear the barcode field in the duplicate item record to make way for the new one generated by the javascript plugin
512
            # we have to clear the barcode field in the duplicate item record to make way for the new one generated by the javascript plugin
512
            $current_item->{barcode} = undef; # FIXME or delete?
513
            $current_item->{barcode} = undef; # FIXME or delete?
513
        }
514
        }
515
516
        # Don't use the "prefill" feature if we want to generate the form with all the info from this item
517
        # It will remove subfields that are not in SubfieldsToUseWhenPrefill.
518
        $prefillitem = 0 if $add_duplicate_submit;
514
    }
519
    }
515
520
516
    # If we have to add multiple copies
521
    # If we have to add multiple copies
517
- 

Return to bug 27526