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

(-)a/Koha/ItemType.pm (-1 / +1 lines)
Lines 101-107 Counts up the number of biblioitems and items with itemtype (code) and hands bac Link Here
101
101
102
sub can_be_deleted {
102
sub can_be_deleted {
103
    my ($self) = @_;
103
    my ($self) = @_;
104
    my $nb_items = Koha::Items->search( { itype => $self->itemtype, deleted_at => undef } )->count;
104
    my $nb_items = Koha::Items->search( { itype => $self->itemtype, deleted_on => undef } )->count;
105
    my $nb_biblioitems = Koha::Biblioitems->search( { itemtype => $self->itemtype } )->count;
105
    my $nb_biblioitems = Koha::Biblioitems->search( { itemtype => $self->itemtype } )->count;
106
    return $nb_items + $nb_biblioitems == 0 ? 1 : 0;
106
    return $nb_items + $nb_biblioitems == 0 ? 1 : 0;
107
}
107
}
(-)a/t/db_dependent/Items_DelItemCheck.t (-2 / +1 lines)
Lines 161-167 DelItemCheck( $biblio->{biblionumber}, $item->{itemnumber} ); Link Here
161
161
162
my $test_item = GetItem( $item->{itemnumber} );
162
my $test_item = GetItem( $item->{itemnumber} );
163
163
164
isnt( $test_item->{deleted_at}, undef,
164
isnt( $test_item->{deleted_on}, undef,
165
    "DelItemCheck should delete item if ItemSafeToDelete returns true"
165
    "DelItemCheck should delete item if ItemSafeToDelete returns true"
166
);
166
);
167
167
168
- 

Return to bug 20271