How do I make Sales Order and Quote User Defined fields 1 to 3 Integer rather than Float?

How do I make Sales Order and Quote User Defined fields 1 to 3 Integer rather than Float?

This content is archived.

Problem

The User Defined Fields User 1, User 2 and User 3 fields appear to be Integer. Howe do I make them Float.  This is impacting custom plugins.

 

Solution

They are not actually integer fields. The display on the grid is to 0 decimal places now by default (unintended side affect of other changes to the grid control) but the underlying datatype in the tables is still DECIMAL(19,6). A plugin can set the desired precision and attached is a plugin which sets the decimal precision on sales orders and quotes to be the local currency decimals.

 

  1. Save the plugin from the article

  2. System Settings > Plugins > Plugin Maintenance

  3. Utilities tab > Import XML

  4. Select this plugin and OK

  5. Save, exit and log back in again

  6. User Defined fields now display to local currency decimals e.g. 2

Plugin Sales and Quotes UserDefined fields to currency decimals.xml

7.2.1.0 and later Plugin Sales and Quotes UserDefined fields to currency decimals.xml

7.2.1.0 and later Plugin Sales and Quotes UserDefined fields to currency decimals, fields unlocked.xml

Related articles