Skip to content

Bug: subsidySummary.totalReductions ignores maximumAmount caps (inconsistent with capped payback fields in same response) #1808

Description

@steilerDev

Severity: Medium — found during a deep project review (2026-07-06).

Defect

subsidySummary.totalReductions in the budget overview response is computed without applying subsidy maximumAmount caps, while the sibling payback fields in the same response object are capped — the response is internally inconsistent.

Evidence

  • server/src/services/budgetOverviewService.ts:280 accumulates percentage reductions with no maximumAmount handling; returned verbatim at :484.
  • minTotalPayback / maxTotalPayback in the same object (:486-487) come from applySubsidyCaps (:461).

Failure scenario

A 10% subsidy with maximumAmount = 1000 on a €50,000 cost basis → response contains totalReductions: 5000 next to maxTotalPayback: 1000.

Suggested fix

Apply the same applySubsidyCaps logic when accumulating totalReductions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    Status
    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions