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

(-)a/cataloguing/additem.pl (+18 lines)
Lines 566-571 if ($op eq "additem") { Link Here
566
    $itemrecord = C4::Items::GetMarcItem($biblionumber,$itemnumber);
566
    $itemrecord = C4::Items::GetMarcItem($biblionumber,$itemnumber);
567
    $nextop = "saveitem";
567
    $nextop = "saveitem";
568
#-------------------------------------------------------------------------------
568
#-------------------------------------------------------------------------------
569
} elsif ($op eq "dupeitem") {
570
#-------------------------------------------------------------------------------
571
# retrieve item if exist => then, it's a modif
572
    $itemrecord = C4::Items::GetMarcItem($biblionumber,$itemnumber);
573
    if (C4::Context->preference('autoBarcode') eq 'incremental') {
574
        $itemrecord = _increment_barcode($itemrecord, $frameworkcode);
575
    }
576
    else {
577
        # we have to clear the barcode field in the duplicate item record to make way for the new one generated by the javascript plugin
578
        my ($tagfield,$tagsubfield) = &GetMarcFromKohaField("items.barcode",$frameworkcode);
579
        my $fieldItem = $itemrecord->field($tagfield);
580
        $itemrecord->delete_field($fieldItem);
581
        $fieldItem->delete_subfields($tagsubfield);
582
        $itemrecord->insert_fields_ordered($fieldItem);
583
    }
584
    $itemrecord = removeFieldsForPrefill($itemrecord) if ($prefillitem);
585
    $nextop = "additem";
586
#-------------------------------------------------------------------------------
569
} elsif ($op eq "delitem") {
587
} elsif ($op eq "delitem") {
570
#-------------------------------------------------------------------------------
588
#-------------------------------------------------------------------------------
571
    # check that there is no issue on this item before deletion.
589
    # check that there is no issue on this item before deletion.
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt (-1 / +1 lines)
Lines 181-186 $(document).ready(function() { Link Here
181
                          <a href="additem.pl?op=edititem&amp;biblionumber=[% item_loo.hostbiblionumber %]&amp;itemnumber=[% item_loo.itemnumber %]#edititem">Edit in host</a> &nbsp; <a class="delete" href="/cgi-bin/koha/cataloguing/additem.pl?op=delinkitem&amp;biblionumber=[% biblionumber %]&amp;hostitemnumber=[% item_loo.itemnumber %]">Delink</a>
181
                          <a href="additem.pl?op=edititem&amp;biblionumber=[% item_loo.hostbiblionumber %]&amp;itemnumber=[% item_loo.itemnumber %]#edititem">Edit in host</a> &nbsp; <a class="delete" href="/cgi-bin/koha/cataloguing/additem.pl?op=delinkitem&amp;biblionumber=[% biblionumber %]&amp;hostitemnumber=[% item_loo.itemnumber %]">Delink</a>
182
                        [% ELSE %]
182
                        [% ELSE %]
183
                          <a href="additem.pl?op=edititem&amp;biblionumber=[% biblionumber %]&amp;itemnumber=[% item_loo.itemnumber %]#edititem">Edit</a>
183
                          <a href="additem.pl?op=edititem&amp;biblionumber=[% biblionumber %]&amp;itemnumber=[% item_loo.itemnumber %]#edititem">Edit</a>
184
<a href="additem.pl?op=dupeitem&amp;biblionumber=[% biblionumber %]&amp;itemnumber=[% item_loo.itemnumber %]#additema">Duplicate</a>
184
                          [% IF ( item_loo.countanalytics ) %]
185
                          [% IF ( item_loo.countanalytics ) %]
185
                            <a href="/cgi-bin/koha/catalogue/search.pl?idx=hi&amp;q=% item_loo.itemnumber %]">View analytics</a>
186
                            <a href="/cgi-bin/koha/catalogue/search.pl?idx=hi&amp;q=% item_loo.itemnumber %]">View analytics</a>
186
                          [% ELSE %]
187
                          [% ELSE %]
187
- 

Return to bug 7369