Some of my suppliers list prices out to 5 decimal places and rounding
these causes errors in line item totals. Also when using landed costs
if they cannot be allocated with enough precision to the applied items
then rounding leads to errors in the Total Tax. This leads to
purchase receipt totals that don’t match payment amounts which have
been rounded later.
I notice that in the database the standard data type for decimal
quantities is DECIMAL(14,2). There is also processing going on in
some of the js functions based on fieldtype?
Obviously this can be somewhat complicated as one probably doesn’t
want 5 digit decimal precision everywhere, but it would be nice to be
able to change the fieldtypes of the form data to adjust precision and
thus control where rounding takes place.
For example the item Rates could be specified at 5 digit precision but
the line item Amounts could be kept at two digit.
Some of my suppliers list prices out to 5 decimal places and rounding these causes errors in line item totals. Also when using landed costs if they cannot be allocated with enough precision to the applied items then rounding leads to errors in the Total Tax. This leads to purchase receipt totals that don't match payment amounts which have been rounded later.
I notice that in the database the standard data type for decimal quantities is DECIMAL(14,2). There is also processing going on in some of the js functions based on fieldtype?
Obviously this can be somewhat complicated as one probably doesn't want 5 digit decimal precision everywhere, but it would be nice to be able to change the fieldtypes of the form data to adjust precision and thus control where rounding takes place.
For example the item Rates could be specified at 5 digit precision but the line item Amounts could be kept at two digit.