Skip to content

[FIX] payroll: apply agreement OOP before the social maximum - #48

Closed
votrelec wants to merge 1 commit into
Data-Dance:19.0from
votrelec:fix/sk-oop-before-cap-upstream-20261116
Closed

votrelec wants to merge 1 commit into
Data-Dance:19.0from
votrelec:fix/sk-oop-before-cap-upstream-20261116

Conversation

@votrelec

Copy link
Copy Markdown
Contributor

Eligible agreement income must be reduced by its dated pension OOP before the social-insurance maximum is applied. For example, a 2026 agreement at EUR 17,100 with OOP 200 uses a pension base of 16,764, rather than 16,564. This changes the five employee/employer pension, disability and reserve rules, with the corresponding TAXBASE, income-tax and NET effects. Guarantee and accident treatment, rates, rounding and dated parameters remain unchanged.

Forwarded from votrelec#2 at the maintainer's request, rebased onto current 19.0 at ed27504 after #43. The five rule bodies are identical to the reviewed fork contribution. The new shared recorder refactor in 19.0.1.25.1 is retained unchanged; this fix takes 19.0.1.26.0. The 18.0 carry-over remains under Unreleased, with English/Slovak guidance and the disclosed frozen-reference update. The Enterprise mirror remains with the maintainer's coordinated merge.

Validation: a fresh public-only Community database with sk_SK, stock OCA payroll, optional surcharges and MVP/VPP/health/ELDP passed 327 tests, zero failures/errors and actual exit 0. This includes the native 2026/2027 OOP/maximum boundaries, all five premiums, unaffected guarantee/accident funds, sub-cent/signed/refund cases and tax/NET effects. Full Git-bundle restoration and identical tree checks passed. This is a fresh-install regression; no Enterprise execution or existing-database upgrade result is claimed.

Reduce eligible agreement income before applying employee/employer caps in the five pension, disability and reserve rules. Keep guarantee/accident bases, rates, rounding and dated parameters unchanged. Explicitly update the frozen reference for these five disclosed arithmetic changes.

Validated 251 tests on clean stock OCA with all insurance declarations, no failures/errors and one existing demo skip. Cover actual premiums, unaffected funds, non-round income, no OOP, negative corrections and dated 2026/2027 limits. Enterprise mirror is required for the coordinated upstream merge.

Assisted-by: OpenAI Codex
@Rad0van

Rad0van commented Nov 16, 2026

Copy link
Copy Markdown
Member

Merged into our 19.0 as aeb1ef54, with your commit and rule bodies unchanged. Two small adjustments went into your commit at port: the version sits above our 19.0.1.25.2, and one test we added today called _compare_original_formulas, which your patch renames to _compare_reference_formulas, so that call follows the rename.

On top of it (e4ef7d87):

  • the same order on the Enterprise engine, in the same five rules, with their frozen rule bodies regenerated (the other rules stay byte-identical) and a test that the recorded fund bases follow;
  • a shared engine-parity scenario for an agreement above the maximum.

Both engines now give PENSION −670.56, DISABILITY −502.92, PENSIONEMPLOYER 2 346.96, DISABILITYEMPLOYER 502.92 and RESERVEFUNDEMPLOYER 796.29 for 17 100 € in June 2026, with sk_SK loaded. The change reaches this repository with the next sync. Closing here, thank you.

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