[dev] Hermes job type hour rates

Chuck Hagenbuch chuck at horde.org
Tue Apr 24 19:40:18 UTC 2007


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

I agree we should go with DB 1.7.8 then and float fields.

> 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 reasonable to me - the idea of the mini-apps like  
Horde_Currencies is to provide functionality, form types, data,  
blocks, etc. that can be used in multiple applications without it  
needing to be in the main Horde core.

-chuck


More information about the dev mailing list