---
title: "Feature: Keep leave in an append-only ledger"
manual: "adsum by web-vision"
version: "main"
permalink: "https://docs.typo3.org/permalink/web-vision/adsum-monorepo:feature-1791004917@main"
source: "Changelog/1.0.0/Feature-1791004917-KeepLeaveInAnAppendOnlyLedger.rst"
rendered: "2026-11-07T02:01:32+00:00"
---

# Feature: Keep leave in an append-only ledger {#feature-1791004917}

## Description {#description}

Every change of a leave balance is a booking in a ledger that is never changed: grants, days taken, refunds, expiries
and corrections. The balance on a date is the sum of the bookings up to it; days with an end date count only until
then. Leave taken uses the days that expire first, and a refund gives the days back to exactly the bookings they came
from. Two bookings of one employee at the same moment cannot both take the last day.

The console command `app:leave:opening-balance` takes over the balance an employee had in a previous system for
the period it covers. Running it again for the same period books nothing.

## Impact {#impact}

Two new tables. The working-time and leave ledgers are checked by the same architecture test, which now also finds
DQL deletes without `FROM`.
