.. include:: /Includes.rst.txt .. _feature-1791529705: ======================================= Feature: Penalty account of an employee ======================================= Description =========== HR records penalties of an employee (``createEmployeePenalty``): an amount in minor units of the company currency, a leave deduction, or both, each only of a kind the company enabled. The employee, managers in scope and HR read them (``listEmployeePenalties``). Packages record penalties through the same service with the records they are for, such as a late arrival; a record belongs to at most one penalty, and recording it again is answered with that penalty. ``PenaltyRecorded`` is published once with the penalty ID as idempotency key, and the employee is told through ``employee.penaltyRecorded``. A leave deduction is checked by the leave package before the penalty is stored; without it, a leave deduction is refused. Impact ====== Two new tables (one migration). Payroll and leave book from ``PenaltyRecorded`` once they consume it. .. index:: API, Database, package:adsum-core