At the moment I am saving several values that represent monetary figures, these values are extracted from a csv file and inserted into a database mysql . Some of these values are found as follows:
// pueden llegar con el punto de mil
// siete mil treinta y cuatro
7.034
// o sin punto de mil pero con valores decimales
// cuatro mil treinta y cuatro con treinta y cuatro décimas
4034.34
The problem occurs when when I make the sum of these, leaving the point in any of the cases the system tends to round the figures which makes the total is very imprecise, trying to solve this before doing the insertion I eliminate the points.
The field in which I save the data is ' DECIMAL (10,2) ' although I have tried it with NUMERIC or FLOAT but it is still the same.
//
7034
//
403434
In the case of the first value, adding it gives a more accurate result by not having decimals, which does not occur with the second value if it has decimals, since it interprets the last two digits as if it were part of this is to say " four hundred and three thousand, four hundred and thirty-four.
I hope to make myself understood