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

User-configured decimal symbol separator is not used in Templates #9261

Closed
SinergiaCRM opened this issue Aug 23, 2021 · 1 comment
Closed
Labels
Area: Emails:Templates Issues & PRs related to email templates Area: PDFs Issues & PRs related to all things regarding PDFs Priority:Moderate Issues & PRs that are minor; broken styling, cosmetic, warnings - there are practical workarounds Type: Bug Bugs within the core SuiteCRM codebase

Comments

@SinergiaCRM
Copy link
Contributor

Issue

The user-configured decimal symbol separator is not used by the Email template parser and the PDF template parser.

Expected Behavior

The CRM uses the decimal symbol separator configured in the user

Actual Behavior

CRM does not use user-configured decimal symbol separator

Possible Fix

Add the necessary code for fields of type Decimal in:

  • the function parse_template_bean() of the file modules / AOS_PDF_Templates / templateParser.php
  • the function getValueFromBean() of the file modules/EmailTemplates/EmailTemplateParser.php (Line 199)

Steps to Reproduce

  1. Set a symbol to separate decimals.

  2. Create a person-based email template that contains a decimal field.

  3. Create a campaign and use the decimal field.

  4. Send a test email and / or a Scheduled email

  5. Check that in the sent email, the decimal value is not being parsed with the configured symbol

  6. Create a PDF template based on People and include the decimal field

  7. Generate a PDF file of a person that has a value in the decimal field
    check that the decimal symbol is not applied in the generated PDF template

Your Environment

  • SuiteCRM Version used: Version 7.11.19 - Sugar Version 6.5.25 (Build 344)
  • Browser name and version: Chrome Versión 92.0.4515.131 (Build oficial) (64 bits)
  • Environment name and version: MySQL, PHP 7
  • Operating System and version: Ubuntu 18.04
@johnM2401 johnM2401 added Area: Emails:Templates Issues & PRs related to email templates Area: PDFs Issues & PRs related to all things regarding PDFs Priority:Important Issues & PRs that are important; broken functions, errors - there are workarounds Type: Bug Bugs within the core SuiteCRM codebase Priority:Moderate Issues & PRs that are minor; broken styling, cosmetic, warnings - there are practical workarounds and removed Priority:Important Issues & PRs that are important; broken functions, errors - there are workarounds labels Aug 24, 2021
@tsmgeek
Copy link
Contributor

tsmgeek commented Aug 26, 2021

I would say that this should not be based on user config, but instead the system config, or the templates should store a flag if format will be user/system defined or even per-template based.

Example, company is based in say UK but staff member creating an Invoice etc is based in Germany, the invoices should be generated in the format of the country the company is based.

Actually it could get more complicated as you may want to generate Invoices in multiple languages and then apply the format applicable to a country.

Personally I would have a big problem if it became user defined as my staff work around the world and when exporting reports etc they want thousand/decimal separators to be in their format, but our invoices need to be consistent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Emails:Templates Issues & PRs related to email templates Area: PDFs Issues & PRs related to all things regarding PDFs Priority:Moderate Issues & PRs that are minor; broken styling, cosmetic, warnings - there are practical workarounds Type: Bug Bugs within the core SuiteCRM codebase
Projects
None yet
Development

No branches or pull requests

3 participants