[dev] Hermes job type hour rates
Duck
duck at obala.net
Tue Apr 24 06:34:02 UTC 2007
On Monday 23 of April 2007 17:43:35 Jan Schneider wrote:
> Your patch includes changes for three different issues. I know you do
> this very often with your own modules, but please keep patches for
> other applications to the point.
> Why do you use VARCHAR fields for the rate? Wouldn't a float be more
> appropriate? And there is no conversion from and to PHP floats which
> is especially important if storing them in a char field because floats
> are formatted according to the current locale.
I had often problems with floats in the past, because of PEAR::DB bug #3021.
It was solved two mounts ago, but it remains a habituate to use varchars. Now
in DB, quoting of float values always have the decimal point as a point,
rather than a comma, irrespective of locale. But I will take in mind for my
future work, your last addition to the coding standards about SQL
compatibility.
For the rates, maybe it would be even better to use my currency field type
from minerva and merk. Is like the standard horde number type, but use
Horce_Currencies. It not requires to have the used locale installed on the
server, and renders the currency symbol next to the field, making it more
intuitive to the user. Or at least we should add a option to the number field
to attach currency symbol next to the field.
Duck
More information about the dev
mailing list