@@ -, +, @@ course item unless it is enabled See that Shelving Location has changed; permanent location in See that Shelving Location has changed back to its original location See that Shelving Location has changed back to what was picked during --- C4/CourseReserves.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) --- a/C4/CourseReserves.pm +++ a/C4/CourseReserves.pm @@ -702,7 +702,10 @@ sub DelCourseItem { return unless ($ci_id); - _RevertFields( ci_id => $ci_id ); + my $course_item = Koha::Course::Items->find( $ci_id ); + return unless $course_item; + + _RevertFields( ci_id => $ci_id ) if $course_item->enabled eq 'yes'; my $query = " DELETE FROM course_items --