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

Incorrect parsing of 0 values in PDF templates #9809

Open
SinergiaCRM opened this issue Nov 2, 2022 · 0 comments · May be fixed by #9810
Open

Incorrect parsing of 0 values in PDF templates #9809

SinergiaCRM opened this issue Nov 2, 2022 · 0 comments · May be fixed by #9810
Labels
Area: PDFs Issues & PRs related to all things regarding PDFs Priority:Important Issues & PRs that are important; broken functions, errors - there are workarounds Status:Fix Proposed A issue that has a PR related to it that provides a possible resolution Type: Bug Bugs within the core SuiteCRM codebase

Comments

@SinergiaCRM
Copy link
Contributor

Issue

PDF templates do not correctly parse 0 values, because they are interpreted as "empty" or false, and do not show any value in the generated PDF document.
If a dropdown list uses 0 as an internal value, the corresponding label will not be displayed for the same reason.

Expected Behavior

If a value is set to 0 it should display as 0 in the PDF template.

Steps to Reproduce

  1. In study create a field of type int in the Accounts module and call it "amount"
  2. Include the field in the edit view and modify a record set it to 0
  3. Create a PDF template for the Accounts module including in the body of the template "$accounts_amount_c"
  4. Generate the PDF document for the modified record and see how the value is not displayed.
  5. In the same record, change the value 0 to any other, regenerate the document and verify that it is generated.
  6. You can repeat the test using a dropdown list that has any of the values set to 0

Context

In some cases it is necessary to show in the PDF templates the explicit value 0

Your Environment

  • SuiteCRM Version used: 7.12.6
  • Browser name and version (e.g. Chrome Version 51.0.2704.63 (64-bit)): Chrome Versión 104.0.5112.101 (Build oficial) (64 bits)
  • Environment name and version (e.g. MySQL, PHP 7): MariaDB 10, PHP 7.4
  • Operating System and version (e.g Ubuntu 16.04): Ubuntu 20.4
juanSTIC pushed a commit to SinergiaTIC/SuiteCRM that referenced this issue Nov 3, 2022
@SinergiaCRM SinergiaCRM linked a pull request Nov 3, 2022 that will close this issue
6 tasks
@johnM2401 johnM2401 added Type: Bug Bugs within the core SuiteCRM codebase Status:Fix Proposed A issue that has a PR related to it that provides a possible resolution Priority:Important Issues & PRs that are important; broken functions, errors - there are workarounds Area: PDFs Issues & PRs related to all things regarding PDFs labels Nov 8, 2022
AlbertoSTIC pushed a commit to SinergiaTIC/SuiteCRM that referenced this issue Jan 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: PDFs Issues & PRs related to all things regarding PDFs Priority:Important Issues & PRs that are important; broken functions, errors - there are workarounds Status:Fix Proposed A issue that has a PR related to it that provides a possible resolution Type: Bug Bugs within the core SuiteCRM codebase
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants