Lines 199-204
sub delete {
Link Here
|
199 |
C4::Biblio::ModZebra( $self->biblionumber, "specialUpdate", "biblioserver" ) |
199 |
C4::Biblio::ModZebra( $self->biblionumber, "specialUpdate", "biblioserver" ) |
200 |
unless $params->{skip_modzebra_update}; |
200 |
unless $params->{skip_modzebra_update}; |
201 |
|
201 |
|
|
|
202 |
if ( C4::Context->preference('EnableVolumes') ) { |
203 |
my $volume_item = |
204 |
Koha::Biblio::Volume::Items->find( { itemnumber => $self->itemnumber } ); |
205 |
my $volume_id = $volume_item ? $volume_item->volume_id : undef; |
206 |
|
207 |
# If this item is the last item on a volume, delete the volume as well |
208 |
if ($volume_id) { |
209 |
my $volume = Koha::Biblio::Volumes->find($volume_id); |
210 |
my @volume_items = $volume->items(); |
211 |
$volume->delete unless @volume_items; |
212 |
} |
213 |
} |
214 |
|
202 |
$self->_after_item_action_hooks({ action => 'delete' }); |
215 |
$self->_after_item_action_hooks({ action => 'delete' }); |
203 |
|
216 |
|
204 |
logaction( "CATALOGUING", "DELETE", $self->itemnumber, "item" ) |
217 |
logaction( "CATALOGUING", "DELETE", $self->itemnumber, "item" ) |
205 |
- |
|
|