.. include:: /Includes.rst.txt .. _feature-1791351454: ============================================ Feature: Delete employees created by mistake ============================================ Description =========== HR deletes an employee record created by mistake with ``deleteEmployee``. The record goes with its employment periods, reporting lines and the leave entitlement granted on hiring. As soon as anything refers to the person, such as reports, a headed department, punches, leave requests or bookings, the answer is 409 with the kinds and counts and the suggestion to schedule an exit instead. An employee who has left is never deleted. The personnel number is not used again, and the linked user account is unlinked and deactivated, unless it holds a role or another employment. Packages report their references through the ``EmployeeReferenceCheck`` registry and remove what belongs only to the record through ``EmployeeOwnedData``. A column naming an employee that neither declares is reported as a reference, so a package without a check never loses data. Impact ====== None. .. index:: API, package:adsum-core, package:adsum-leave, package:adsum-attendance