Decimal point error

Hello everyone.

I have the following problem with the decimals (invoices, orders, etc):

If I enter 3.5, Dolibarr registers 3,5. Great!
If I enter 3.55, Dolibarr registers 3,55. Great!
If I enter 3.555, Dolibarr registers 3.555,0. WOW → Convert 3€ in 3000€

I tried to change the following parameter without any result:

Configuration - Limits and precision - Max number of decimals → I have increased this value

My Dolibarr version is 19.0.1

Thanks a lot in advance for your help.

what is your language settings and decimals settings?

Hey Jon.

My language is defined as “Catalan” (langs/ca_ES). Inside main.lang I can see:

SeparatorDecimal=,
SeparatorThousand=.

Is it your question?

yes, that is my question.

I’d like to see some pictures of this thing in action

OK. Here the pictures:

For example, I’m creating an order for a random supply with a price of 5.0€:

Here the correct result:

Now the same with a value of 5.01:

The result is correct, too:

And now the price with problem: 5.015:

This is the incorrect result:

Thank you for your interest. And yes, I have some stupid offers with prices with three decimal places.

Hello,

You should use , not . that’s all

If you know that your location settings indicate to use “,” for decimal, why are you using “.” to capture prices ¿?

I suppose that the annoying thing for you is that Dolibarr “understand well” when you write “5.01”, but in fact you should write “5,01” :sweat_smile:

Eloi, i’m from Barcelona, but i’m living on Mexico since the last 17 years. And when i arrived here i couldn’t believe that in the rest of the world (outside Europe) people (specially english people) use the dot “.” as decimal separator. For this reason, ALL THE PROGRAMMING LANGUAGES use the “.” to separate decimals. The classic electronic calculators too, in fact.

So, the fact that in Europe you use the “,” as decimal separator… sincerely… it’s a trhuly pain!!! hehehe :sweat_smile: More annoying even that to drive on the left way (UK).

Thank you Ksar and caos30 and greetings from Catalonia :grin:

The only reason for using the dot instead of a comma is that the dot is located on the numeric keypad. Dolibarr solves this problem (an European person using dot instead coma) with 1 and 2 decimals, but presents this problem with 3 decimals.

Yes because . is declared as thousand separator.

You could try to declare ; as thousand spearator to see if it is better.

Is it possible to avoid a thousand separators? For me it is better to eliminate the thousand separator than to use it ;

Hello, not possible.

In this case, I solved the problem by using the Microsoft PowerToys programme to set the dot on the numeric keypad to a coma.

https://github.com/microsoft/PowerToys

Nevertheless, from my point of view, it’s a problem od Dolibarr. It doesn’t make sense to change the point to comma introducing 1 or 2 decimals and change this function introduciing 3 decimals.

Ah, I see, now I’m starting to understand your underlying problem: your own keyboard is “sabotaging” you!! It’s writing decimal points instead of decimal commas.

Again, here you’re suffering from what I was telling you, in reality, the “anomaly” is that European use of the “decimal comma” instead of the point. It’s understandable that it happened 30 or 50 years ago when computing was born, but nowadays it would be “convenient” if you were to change this “against-the-grain habit”.

If it was possible to replace “pesetas”, “francs”, and “German marks” with the euro despite that unforgettable currency change… you can change the decimal comma to the decimal point!

Just like the dreaded daylight saving time change on summer, which is as much of a nuisance as any in the world for time compatibility in international business. Please, eradicate that aberration that doesn’t make much sense.

Best regards!
Sergi

WOW. Segi. I see you want to philosophise a bit. So let’s get on with it:

These kinds of differences are basically cultural. And differences can be seen as positive or negative. For me they are positive. I travel around the world to see these differences.

People in Britain and Japan drive on the left. It’s a big problem to produce cars, to sell these cars, it’s dangerous for foreigners, etc. but they are not going to change it. It’s their own culture.

Finally, the use of “,” as decimal separator is not strange in the world:

image

It seems that many of these countries may have recently changed their practices, as my online searches for “supermercado en línea en Colombia” in various Latin American countries (Venezuela, Argentina, Peru, Colombia, etc.) show that about half of them are now using the decimal point instead of the comma. This suggests that the source of the map you mentioned might be somewhat outdated. I’ve found evidence to support this observation.

This isn’t really a matter of philosophy, but rather one of practicality. It’s similar to how wristwatches and wall clocks were initially manufactured to rotate in both directions before being standardized to one direction.

The issue of driving on the left side of the road is indeed a significant challenge. It’s not so much about vehicle manufacturing, but more about the safety concerns when someone moves from a country with one driving orientation to another. Personally, I hope to see this change in my lifetime. The advent of self-driving cars might help facilitate this transition.

History is full of examples where seemingly subtle changes in cultural practices have had far-reaching impacts. Few changes have been as significant as the shift from Roman to Arabic numerals 12 centuries ago, but it happened, and for the better.

Similarly, the transition to the Euro in Europe was a major change. Today, it’s unlikely that many would advocate for returning to the old national currencies. This change is still recent and generational. For instance, few Spaniards may realize that the “peseta”, often considered the “traditional” Spanish currency (and in fact was a catalan coin called “peçeta” = “little piece”), was only the official “currency of the Kingdom of Spain” for about 130 years (since 1868). Before that, there were many different currencies in Spanish territories, and choosing one was seen as an obvious economic benefit. It’s doubtful that anyone now remembers or laments this “cultural loss.”

I’m not trying to convince anyone, just presenting facts. Continuing to use the comma as a decimal separator seems to be a losing battle, and prolonging its use may only extend the difficulties for its users. While I understand that some people still find value in this practice, perhaps due to our stoic heritage, it might be worth considering the benefits of change.