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

(-)a/cataloguing/additem.pl (-2 / +6 lines)
Lines 413-418 my $prefillitem = C4::Context->preference('PrefillItem'); Link Here
413
if ($op eq "additem") {
413
if ($op eq "additem") {
414
414
415
    my $add_submit                 = $input->param('add_submit');
415
    my $add_submit                 = $input->param('add_submit');
416
    my $add_duplicate_submit       = $input->param('add_duplicate_submit');
416
    my $add_multiple_copies_submit = $input->param('add_multiple_copies_submit');
417
    my $add_multiple_copies_submit = $input->param('add_multiple_copies_submit');
417
    my $number_of_copies           = $input->param('number_of_copies');
418
    my $number_of_copies           = $input->param('number_of_copies');
418
419
Lines 488-494 if ($op eq "additem") { Link Here
488
    }
489
    }
489
490
490
    # If we have to add & duplicate
491
    # If we have to add & duplicate
491
    if ($prefillitem) {
492
    if ($prefillitem || $add_duplicate_submit) {
492
493
493
        $current_item = $item->unblessed;
494
        $current_item = $item->unblessed;
494
495
Lines 500-505 if ($op eq "additem") { Link Here
500
            # we have to clear the barcode field in the duplicate item record to make way for the new one generated by the javascript plugin
501
            # we have to clear the barcode field in the duplicate item record to make way for the new one generated by the javascript plugin
501
            $current_item->{barcode} = undef; # FIXME or delete?
502
            $current_item->{barcode} = undef; # FIXME or delete?
502
        }
503
        }
504
505
        # Don't use the "prefill" feature if we want to generate the form with all the info from this item
506
        # It will remove subfields that are not in SubfieldsToUseWhenPrefill.
507
        $prefillitem = 0 if $add_duplicate_submit;
503
    }
508
    }
504
509
505
    # If we have to add multiple copies
510
    # If we have to add multiple copies
506
- 

Return to bug 27526