Description
updateRule() allows changing a tax rule's type (e.g. from flat to percentage) without re-validating that the existing value field still makes sense for the new type. A percentage rule with a value of 50000 (clearly meant as a flat amount) could silently persist after a type change.
Where
backend/src/controllers — TaxController.updateRule
Acceptance Criteria
Description
updateRule()allows changing a tax rule'stype(e.g. from flat to percentage) without re-validating that the existingvaluefield still makes sense for the new type. A percentage rule with avalueof 50000 (clearly meant as a flat amount) could silently persist after a type change.Where
backend/src/controllers— TaxController.updateRuleAcceptance Criteria
valueagainst the newtype's constraints whenevertypechanges in an update