Leave types, accrual, and carryover
A leave type is the template for a kind of time off. It carries an annual entitlement in days, whether it is paid, whether it requires approval, a colour, and whether it is active. Setting these deliberately matters because they shape everything downstream: an unpaid type will later prorate pay, and a type that does not require approval skips the queue. You define types once in the leave settings and reuse them across the workforce.
Entitlement can be granted in two ways. Upfront accrual gives the whole year's allowance at once; monthly accrual builds it up over the year, capped so it never exceeds the annual entitlement. A scheduled monthly job performs the accrual idempotently — running it twice in a month does not double-credit. At year end, a carryover step moves unused balance into the new year up to a configurable carryover cap, so "use it or lose it" and "carry everything" are both expressible per type.
The balance itself is a stored figure per employee, per type, per year, defined as opening + accrued + adjustment − taken. Storing it (rather than only computing on the fly) means approvals record what was taken and cancellations reverse it, and the number stays stable and auditable. When you introduce a new type mid-year, think about which accrual method and carryover cap reflect your policy, because those two settings are what make the yearly numbers behave.
Key takeaways
- A leave type sets entitlement, paid/unpaid, whether approval is required, and active state.
- Accrual is upfront or monthly (capped at entitlement); the monthly job is idempotent.
- Year-end carryover moves unused balance forward up to a per-type carryover cap.
- Balance = opening + accrued + adjustment − taken, stored per employee/type/year.