[8.5.1] negative values on opportunity currency fields does not work anymore
Closed this issue · 0 comments
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”
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
- SuiteCRM Version used: 8.5.1
- Browser name and version (e.g. Chrome Version 51.0.2704.63 (64-bit)): FF 121
- Environment name and version (e.g. MySQL, PHP 7): MariaDB PHP 8.2
- Operating System and version (e.g Ubuntu 16.04): Rocky Linux 9