Workflow - Assigning decimal values always round to two decimals #4921

Open
opened 2026-02-20 16:26:18 -05:00 by deekerman · 0 comments
Owner

Originally created by @SinergiaCRM on GitHub (Jan 11, 2023).

In a Workflow action that modifies a record adding the decimal value of a field to another decimal field, the result is always rounded to two decimals

DecimalsRound

Issue

Some of the decimals are lost during the execution of the action.

Expected Behavior

All the decimals should be transfered.

Actual Behavior

The system isn't taking into account the decimal precision defined in the vardef.

Possible Fix

Use the vardef precision in the workflow action.

Steps to Reproduce

  1. Create two decimals fields in Accounts (fielda_c, fieldb_c)
  2. Create a workflow with an action that modified the record, adding the value the "fielda_c" to "fieldb_c"
  3. Save an Account record adding the value 12.345678 to fielda_c
  4. Check that, with the result of the WF action, fieldb_c contains 12.350000

Context

This is losing information, or valuable data.

Your Environment

  • SuiteCRM Version used: 7.12.8
  • Browser name and version: Versión 107.0.5304.121 (Build oficial) (64 bits)
  • Environment name and version: MariaDB 10.6.5, PHP 7.4
  • Operating System and version : KDE Neon 5.26
Originally created by @SinergiaCRM on GitHub (Jan 11, 2023). In a Workflow action that modifies a record adding the decimal value of a field to another decimal field, the result is always rounded to two decimals ![DecimalsRound](https://user-images.githubusercontent.com/61022311/211793732-00697d57-0490-400e-9126-62e2fc0bc24b.gif) #### Issue Some of the decimals are lost during the execution of the action. #### Expected Behavior All the decimals should be transfered. #### Actual Behavior The system isn't taking into account the decimal precision defined in the vardef. #### Possible Fix Use the vardef precision in the workflow action. #### Steps to Reproduce <!--- Provide a link to a live example, or an unambiguous set of steps to --> <!--- reproduce this bug include code to reproduce, if relevant --> 1. Create two decimals fields in Accounts (fielda_c, fieldb_c) 2. Create a workflow with an action that modified the record, adding the value the "fielda_c" to "fieldb_c" 3. Save an Account record adding the value 12.345678 to fielda_c 4. Check that, with the result of the WF action, fieldb_c contains 12.350000 #### Context This is losing information, or valuable data. #### Your Environment * SuiteCRM Version used: 7.12.8 * Browser name and version: Versión 107.0.5304.121 (Build oficial) (64 bits) * Environment name and version: MariaDB 10.6.5, PHP 7.4 * Operating System and version : KDE Neon 5.26
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/SuiteCRM-SuiteCRM#4921
No description provided.