-
Notifications
You must be signed in to change notification settings - Fork 2
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
Hotfix - Plantillas PDF - Formatear número con las preferencias del usuario #429
Conversation
Actions executed at: 2024-11-19 15:31:27. |
SticInclude/Utils.php
Outdated
$dec_sep = empty($user_dec_sep) ? $sugar_config['default_decimal_seperator'] : $user_dec_sep; | ||
$grp_sep = empty($user_grp_sep) ? $sugar_config['default_number_grouping_seperator'] : $user_grp_sep; | ||
$sig_digits = empty($user_sig_digits) ? $sugar_config['sigDigits'] : $user_sig_digits; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
El nombre correcto de la configuración debería ser default_currency_significant_digits
: en config.php, se define en $sugar_config
:
Line 267 in b96498d
'default_currency_significant_digits' => 2, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Corregido!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ver comentario en el código
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(A)Probado
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(A)probado
PR en SA: salesagility#10598 |
Description
Como se describe en el issue, se ha comprobado que en un campo de tipo decimal, no mostraba el separador de miles al generar una plantilla PDF. Debería reflejar el formato de número tal como se muestra en el CRM, donde sí aparece el separador de miles en las vistas.
Se ha implementado en la función que formatea el número decimal con las preferencias que tiene el usuario, o están por defecto, de los separadores y el número de decimales que se quiere mostrar con la función number_format()
How To Test This