|
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. |