Schedule icon
OutputValues icon
If icon
Fail icon
Queries icon
Log icon
UploadFiles icon
Switch icon
Set icon

Close IFRS 16 leases each month with remeasurements, terminations and the maturity analysis

IFRS 16 lease close in Kestra and DuckDB. Lease liability, right-of-use depreciation, CPI remeasurement, terminations, maturity analysis, journals.

Categories
BusinessData

Since IFRS 16, almost every lease is on the balance sheet: a lease liability, and a right-of-use asset depreciated over the term. The month-end entries are mechanical. The parts that go wrong are the events and the reconciliation:

  • a rent indexed to inflation changes,
  • a car is handed back early,
  • a new office starts,
  • the auditors want the liability rolled forward, split into current and non-current, and its undiscounted maturities disclosed.

This flow runs the whole close from the lease register and refuses to lock a month that does not tie.

It runs with no setup and no network. DuckDB holds a register of 20 leases:

  • offices, a warehouse and a store, with annual escalation, paid in arrears or in advance;
  • ten company cars, one of them handed back early;
  • forklifts and a colocation contract;
  • a head office lease indexed to CPI, revised in September 2026;
  • a new regional office starting in September 2026;
  • a 9-month pop-up store and office printers, which are exempt.

This blueprint was created by zkasuran.

Measurement

Item Rule
Liability at each month end Present value of the payments still to come, at the monthly equivalent of the incremental borrowing rate. This is the effective interest method in closed form, so the schedule cannot drift
Interest Closing - opening + payments. It is checked independently against the opening balance times the monthly rate
Payments in advance The payment at commencement goes into the right-of-use asset, not the liability
Right-of-use asset Initial liability + payments at commencement, straight-line over the term
Index-linked payment change Remeasured at the original rate when the changed payment takes effect (IFRS 16.42(b)). The asset is adjusted by the same amount and depreciated over the remaining months
Early termination The liability and the asset are derecognized at month end, with the difference as gain or loss
Short-term (12 months or less) and low-value Payments expensed (IFRS 16.6)
Current portion Principal falling due within 12 months
Maturity analysis Undiscounted remaining payments within 1 year, 1 to 5 years, and beyond (IFRS 16.58)

Controls

  • Blocks on a lease without a borrowing rate, a non-positive payment, a missing term, or a "short-term" lease longer than 12 months.
  • Blocks when the interest check fails, a lease's liability or asset does not roll forward, or the journal does not balance.
  • Restatement check: the opening balances recomputed from today's register must equal the closing balances the last close stored in KV. If they differ, the register changed for a closed month, and the flow stops.
  • A remeasurement or a termination needs approved_by.

How it works

  1. period_control and period_gate refuse a closed period or one whose previous period is open, and read the last closing balances.
  2. measure (io.kestra.plugin.jdbc.duckdb.Queries) builds the payments of every lease and the liability and asset at every month end. It then computes the period's movements lease by lease, the maturity analysis, the blockers and the journal.
  3. log_close prints both roll-forwards. evidence stores register.csv, movements.csv (one row per lease), maturity-analysis.csv, journal.csv and blockers.csv.
  4. decide (io.kestra.plugin.core.flow.Switch):
    • READY: locks the period with the closing liability, current portion and right-of-use asset.
    • Otherwise it fails with the reason: BLOCKED, RESTATED or NEEDS_APPROVAL.

Tested end to end

On Kestra 2.0.3 OSS, in this order.

Run Inputs Result
1 2026-08 15 leases on balance sheet, 2 exempt. Liability 5,356,171.14 + interest 20,997.29 - payments 115,832.75 = 5,261,335.68, current 1,096,300.93. Right-of-use depreciation 98,361.49. Closed
2 2026-09 New office L16 (798,306.81) and L01 CPI remeasurement (+100,013.54, rent +3.4%): stops for approval
3 same, approved_by Closed. Liability 6,054,422.70, right-of-use 5,431,838.08
4 2026-10 L09 handed back: liability 23,879.62, asset 23,646.07, gain 233.55. Stops for approval, then closes
5 2026-10 again / 2026-12 Refused
6 2026-11 ISSUES Blocked by the 3 issues: L19 without a borrowing rate, L20 with a payment of -500.00, L21 with no term
7 2026-11, warehouse rent changed to 29,500 in the register RESTATED: liability off by 42,279.74, right-of-use by 37,071.12 against the September close
8 2026-11 Closed

I checked the closing liability of every lease for August, September and October against a separate month-by-month amortization loop in Python: interest on the balance, minus the payment, with the remeasurement at the start of September. There were 0 differences above 0.02.

Problems found while testing

  • The remeasurement landed a month early. The first version closed August with the CPI-revised liability, because the revision takes effect at the start of September, which is the same instant as the end of August. The schedule now keeps two balances at each month end: the one closing the month (l_pre) and the one the next month starts from (l_post). The difference between them is the remeasurement.
  • Floating point broke the roll-forward. Differences of 1e-10 failed the tie-out until every amount was cast to DECIMAL(14, 2).
  • The termination memo listed every lease. A missing filter. It now names only the terminated lease.

Inputs

Input Default Purpose
period 2026-08 YYYY-MM, validated
scenario CLEAN Demo only
approved_by empty Needed for remeasurements and terminations

Use it with your data

  • Replace leases with your lease register:
    • commencement (first of a month), term in months, timing (ADVANCE or ARREARS), monthly payment, annual escalation and borrowing rate;
    • for an index change: the month it takes effect and the change;
    • for an early termination: its last month;
    • SHORT_TERM or LOW_VALUE for exempt leases.
  • Map the accounts (1680, 1690, 2600, 6600, 6610, 7400, 7210, 6910) to your chart of accounts.

Things to know

  • Initial direct costs, lease incentives, restoration provisions, purchase options and residual value guarantees are not modelled. Add them to the initial measurement of the asset or liability.
  • A modification that changes the scope or the consideration needs a new discount rate (IFRS 16.44-46). This flow handles index-linked changes, which keep the original rate.
  • Reopening a period is deliberate: delete the KV key lease_close.

Links

See How

New to Kestra?

Use blueprints to kickstart your first workflows.