Lines 632-645
sub ModDateLastSeen {
Link Here
|
632 |
|
632 |
|
633 |
=head2 DelItem |
633 |
=head2 DelItem |
634 |
|
634 |
|
635 |
DelItem( $biblionumber, $itemnumber ); |
635 |
DelItem({ itemnumber => $itemnumber, [ biblionumber => $biblionumber ] } ); |
636 |
|
636 |
|
637 |
Exported function (core API) for deleting an item record in Koha. |
637 |
Exported function (core API) for deleting an item record in Koha. |
638 |
|
638 |
|
639 |
=cut |
639 |
=cut |
640 |
|
640 |
|
641 |
sub DelItem { |
641 |
sub DelItem { |
642 |
my ( $biblionumber, $itemnumber ) = @_; |
642 |
my ( $params ) = @_; |
|
|
643 |
|
644 |
my $itemnumber = $params->{itemnumber}; |
645 |
my $biblionumber = $params->{biblionumber}; |
646 |
|
647 |
unless ($biblionumber) { |
648 |
$biblionumber = C4::Biblio::GetBiblionumberFromItemnumber($itemnumber); |
649 |
} |
643 |
|
650 |
|
644 |
# FIXME check the item has no current issues |
651 |
# FIXME check the item has no current issues |
645 |
_koha_delete_item( $itemnumber ); |
652 |
_koha_delete_item( $itemnumber ); |
Lines 2287-2293
sub DelItemCheck {
Link Here
|
2287 |
} elsif ($countanalytics > 0){ |
2294 |
} elsif ($countanalytics > 0){ |
2288 |
$error = "linked_analytics"; |
2295 |
$error = "linked_analytics"; |
2289 |
} else { |
2296 |
} else { |
2290 |
DelItem($biblionumber, $itemnumber); |
2297 |
DelItem( |
|
|
2298 |
{ |
2299 |
biblionumber => $biblionumber, |
2300 |
itemnumber => $itemnumber |
2301 |
} |
2302 |
); |
2291 |
return 1; |
2303 |
return 1; |
2292 |
} |
2304 |
} |
2293 |
} |
2305 |
} |