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

Fix #10596 - No display of user preferences in a decimal type field in PDF templates #10598

Open
wants to merge 1 commit into
base: hotfix
Choose a base branch
from

Conversation

SinergiaCRM
Copy link
Contributor

Description

Fixing #10596

It was found that in a decimal type field, it did not show the thousands separator and the Currency Significant Digits when generating a PDF template. It should reflect the number format as shown in the CRM, where the thousands separator and Currency Significant Digits are displayed in the views.

It has been implemented in the function that formats the decimal number with the preferences that the user has, or they are by default, of the separators and the number of decimals to be displayed with the function number_format().

Motivation and Context

The solution returns the value with the thousands separator and the Significant Currency Digits, in addition to the decimal separator, that the user has configured in his profile.

How To Test This

  1. Go to Studio and in a module create a decimal type field.
  2. Add that field to the edit view and add a number greater than 999 with decimal places.
  3. Go to Profile-Advanced and check or change the values of Thousands Separator, Decimal Separator and Significant Digits in Currency.
  4. Include the decimal field in a PDF template.
  5. Check that the number is displayed with the appropriate separators and number of decimal places when generating the template.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Final checklist

  • My code follows the code style of this project found here.
  • My change requires a change to the documentation.
  • I have read the How to Contribute guidelines.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant