Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[8.5.1] negative values on opportunity currency fields does not work anymore #434

Closed
TimmiORG opened this issue Feb 13, 2024 · 0 comments
Closed
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

Comments

@TimmiORG
Copy link

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
grafik

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
@TimmiORG TimmiORG changed the title [8.5.1] negative values on opportunity currency fileds does not work anymore [8.5.1] negative values on opportunity currency fields does not work anymore Feb 13, 2024
@gemartin21 gemartin21 added Type: Bug Something isn't working Priority:Important Issues & PRs that are important; broken functions; errors; there are workarounds Area: Opportunities Issues & PRs related to all things regarding Opportunities Status: Team Investigating Labels for issues in which the Core Team are investigating / Intend to Investigate labels Feb 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

No branches or pull requests

2 participants