[dev] Hermes job type hour rates

Jan Schneider jan at horde.org
Tue Apr 24 09:49:47 UTC 2007


Zitat von Duck <duck at obala.net>:

> 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.

We should require DB 1.7.8 for Hermes, or maybe even for Horde then. I  
just skimmed through that bug report and it's really a shame that this  
hasn't been fixed for years.

> 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.

That sounds interesting. To be honest, I haven't taken a closer look  
at Horde_Currency yet.

Jan.

-- 
Do you need professional PHP or Horde consulting?
http://horde.org/consulting/



More information about the dev mailing list