Skip to content

[19.0][FIX] payroll: use dated employer sick-pay caps - #55

Open
votrelec wants to merge 2 commits into
Data-Dance:19.0from
votrelec:fix/sk-employer-pn-dated-caps-20261118
Open

votrelec wants to merge 2 commits into
Data-Dance:19.0from
votrelec:fix/sk-employer-pn-dated-caps-20261118

Conversation

@votrelec

Copy link
Copy Markdown
Contributor

The employer sick-pay parameter currently uses Social Insurance Agency-style upward ceilings. In2027, using106.5206 for14 employer-paid calendar days produces724.35 euros, whereas the employer maximum106.5205 produces724.34. The2024 row also derives from the wrong assessment year: it contains79.6274 instead of85.7424.

Correct only the existing dated OCA parameter rows:2024=85.7424,2025=94.0273,2026=100.2082,2027=106.5205. Employer DVZ is truncated to four places under Act462/2003 section8(7)-(8); the same rounding was in force in2024-2025. The yearly assessment amounts come from the Social Insurance Agency table: the2024 employer ceiling uses the2022 general base15648. This is separate from the Agency sickness-benefit maximum.

Validation:25 targeted native Odoo19 tests passed, covering the dated table,2027 maximum with actual approved leave and manual inputs, unaffected parameter regressions, cross-year onset terms, calendar days, employment termination and insured/uninsured profiles. No salary formula is changed. The new2027 maximum cases exercise the actual native salary rule; existing dated-parameter and calendar regressions remain. EN/SK source docs and18.0 carry-over are recorded; the generated-repository docs tool is absent, so generated output is not claimed. Enterprise/18.0 are not tested.

Updating dated parameters does not recalculate, certify or repost retained payslips; those require the normal correction workflow. This PR is independent of the parameter-ambiguity guard in#54 and changes no private functionality.

Apply section 8(7)-(8) of Act 462/2003 independently from the Social Insurance Agency ceiling; correct the 2024 assessment year and 2024-2027 four-place downward caps. Cover native leave and manual PN input at the 2027 maximum and preserve historical effective dates.

Assisted-by: OpenAI Codex
@Rad0van

Rad0van commented Nov 18, 2026

Copy link
Copy Markdown
Member

Thank you, this is a real fix and the figures check out. We recomputed every value from the primary sources rather than from the PR, and they match yours to the last digit.

The rule. § 8 ods. 7 zákona č. 462/2003 Z. z. caps the employee's denný vymeriavací základ at the DVZ "určený z 2-násobku všeobecného vymeriavacieho základu platného v kalendárnom roku, ktorý dva roky predchádza kalendárnemu roku, v ktorom vznikol dôvod na poskytnutie náhrady príjmu", and § 8 ods. 8 rounds the DVZ "na štyri desatinné miesta nadol". The wording of both odseky is identical in the consolidated version of 1. 1. 2023 (in force through 31. 12. 2025, so 2024 and 2025) and in the version of 1. 1. 2026, which is still the latest published one and therefore also governs 2027. The footnote points to § 11 zákona č. 461/2003 Z. z., where the VVZ is 12 × the average monthly wage "za príslušný kalendárny rok", so the year Y cap uses the VVZ for year Y − 2.

Why the old values were off. The sickness benefit paid by Sociálna poisťovňa has the same cap formula in § 55 ods. 2 zákona č. 461/2003, but § 55 ods. 1 rounds "na štyri desatinné miesta nahor". Our 2025–2027 rows were taken from the SP-side figures, so each was 0.0001 too high for the employer's náhrada. The 2024 row, 79.6274, is the SP cap for 2023 (VVZ 2021 = 14 532, rounded up), i.e. one year stale and rounded the wrong way.

Recomputed (exact decimal, 2 × VVZ(Y−2) / 365):

  • 2024: VVZ 2022 = 15 648 → 85.74246575… → 85.7424 (SP: 85.7425; ours: 79.6274)
  • 2025: VVZ 2023 = 17 160 → 94.02739726… → 94.0273 (SP and ours: 94.0274)
  • 2026: VVZ 2024 = 18 288 → 100.20821918… → 100.2082 (SP and ours: 100.2083)
  • 2027: VVZ 2025 = 19 440 → 106.52054795… → 106.5205 (SP and ours: 106.5206)

VVZ figures are from the Sociálna poisťovňa table you linked. A payroll vendor's published 2024/2025 comparison independently lists exactly this split (náhrada 85,7424 / 94,0273 "nadol", nemocenské 85,7425 / 94,0274 "nahor"), which also settles the divisor: 365 is used for 2024 even though it is a leap year, consistent with the SP cap for the same year.

Money impact. 2027, 14 days at the cap: 106.5205 × (3 × 0.25 + 11 × 0.55) = 724.3394 → 724.34 under § 10 ods. 2; with 106.5206 it is 724.34008 → 724.35, so your test discriminates on exactly the cent that matters. For 2025 the existing 385.52 case is unaffected (94.0273 × 4.1 = 385.51193 → 385.52). The 2024 correction is the substantial one: a capped 10-day episode goes from 366.29 to 394.42 €, i.e. the old row underpaid by 28.13 €.

Testing. On origin/19.0 with the patch applied, l10n_sk_hr_payroll_oca + _base + _parity: 0 failed (baseline 0 failed as well). Upgrading an origin/19.0 database with -u rewrites all four stored values (the file is not noupdate). As a negative control we put the four old values back while keeping your tests: the new tests fail on every row and on both 724.34 cases (724.35), so they guard what they claim to.

Small things before merge (none affects the figures):

  • doc/en.md, doc/sk.md and the CHANGELOG entry have lost the spaces before numbers ("section8(7)-(8)", "Act462/2003", "In2027 the first14 calendar days … pay724.34", "§8 ods.7–8 zákona462/2003", "roku2027", "base15648"). Please restore them; these pages are published as they stand.
  • tests/test_sk_payroll.py around line 2256 still says "2025 cap94.0274"; with your change the cap is 94.0273 (the expected 385.52 stays right). Worth updating the comment so it does not contradict the data.
  • The 2024 block in hr_rule_parameter_data.xml is introduced by the comment "Agreement OOP, meal, DDS, PN — unchanged from 2024 to 2025", which is not true of the max DVZ. Optional, but a one-line note on the 2024 row (VVZ 2022, rounded down) would keep the next reader from "fixing" it back.
  • The version jumps from 19.0.1.26.2 to 19.0.1.26.4; if .3 is reserved for [19.0][FIX] payroll: reject conflicting effective parameter values #54 that is fine, we will settle the numbering at merge.

Enterprise and 18.0. The Enterprise bridge carries the same parameter with the same four old values (and its own 2027 parameter test pins 106.5206); we will mirror the correction there, and on 18.0 (both engines), when we port this. No need to touch anything outside this module in this PR.

Verdict: approve once the missing spaces in the docs are restored; the rest is optional polish.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants