Lines 217-222
sub delete {
Link Here
|
217 |
C4::Biblio::ModZebra( $self->biblionumber, "specialUpdate", "biblioserver" ) |
217 |
C4::Biblio::ModZebra( $self->biblionumber, "specialUpdate", "biblioserver" ) |
218 |
unless $params->{skip_modzebra_update}; |
218 |
unless $params->{skip_modzebra_update}; |
219 |
|
219 |
|
|
|
220 |
if ( C4::Context->preference('EnableVolumes') ) { |
221 |
my $volume_item = |
222 |
Koha::Biblio::Volume::Items->find( { itemnumber => $self->itemnumber } ); |
223 |
my $volume_id = $volume_item ? $volume_item->volume_id : undef; |
224 |
|
225 |
# If this item is the last item on a volume, delete the volume as well |
226 |
if ($volume_id) { |
227 |
my $volume = Koha::Biblio::Volumes->find($volume_id); |
228 |
$volume->delete unless $volume->items->count > 1; |
229 |
} |
230 |
} |
231 |
|
220 |
$self->_after_item_action_hooks({ action => 'delete' }); |
232 |
$self->_after_item_action_hooks({ action => 'delete' }); |
221 |
|
233 |
|
222 |
logaction( "CATALOGUING", "DELETE", $self->itemnumber, "item" ) |
234 |
logaction( "CATALOGUING", "DELETE", $self->itemnumber, "item" ) |
223 |
- |
|
|