Change from 2 decimals to 3 decimals

Hi, I have a project installed with the following features

CRM Suite version 7.2.1
Sugar CRM version 6.5.20

we wanted to change the precision of the number of decimals of all the prices and quantities of the application, from 2 to 3. How could we do this?

In User profile / Advanced, you have a setting for “Currency significant digits”.

I fear this option is very infrequently used and there might be places in the app where it isn’t respected or doesn’t work well. But it’s worth a try.

I have followed your instructions, I have tried it and it works :). Thank you very much and greetings.

Hello, I reopen this thread because the solution that they proposed to me is only aesthetic, that is to say, 3 decimals are effectively shown if I configure it that way. But for example, if I keep a product with price 1,575, it is rounded to 2 decimal places 1.58, because it shows 1,580 instead of 1,575.

I tried setting the bcmath.scale = 3 parameter in the php.ini but still rounding the prices to 2 decimals.

Thanks in advance

Maybe you can look for two other possible sources of the problem:

  • database settings on that field

  • the moment when the field is saved into the database, maybe it’s rounded at that point. Ideally you would walk through the code with a debugger to find out

I have already discovered the error, it is because the fields relating to the amounts, costs, etc., in database are defined with only 2 decimals, I guess the solution will then increase this number of decimals …

Ok, if you get this working we could write up a tutorial, or a Technical blog post, detailing how to do it.