[8.5.1] negative values on opportunity currency fields does not work anymore #434
Labels
Area: Opportunities
Issues & PRs related to all things regarding Opportunities
Priority:Important
Issues & PRs that are important; broken functions; errors; there are workarounds
Status: Team Investigating
Labels for issues in which the Core Team are investigating / Intend to Investigate
Type: Bug
Something isn't working
Issue
We used in v7.x in our opportunities negative values to build and report credit notes.
I found out that in v.8.5.1. the currency field doesn’t accept a - (minus) in front of the value and a yellow field shows up “There are validation errors, unable to perform action”
See:
https://community.suitecrm.com/t/suitecrm-v8-5-1-negative-values-on-opportunity-currency-fields-wont-work-anymore
Expected Behavior
Negative values were possible in the 7.x release.
Actual Behavior
Does not accept negative values
Possible Fix
The following was mentioned in the forum
`Apparently the regexp in core/app/core/src/lib/services/formatters/number/number-formatter.service.ts, function getFloatUserFormatPattern doesn’t allow negative numbers, which doesn’t seem appropriate for floats.
When handling currencies, this is called from StandardValidatorFn in core/app/core/src/lib/services/record/validation/validators/currency.validator.ts`
Steps to Reproduce
Sales -> Opportunities -> create opp / or view opp if there are already existing opps
-> edit opportunity amount -> enter a currency value (e.g. €) with a minus in front, e.g -5
Context
This is effecting the possibility of credit notes.
Your Environment
The text was updated successfully, but these errors were encountered: