Forum OpenACS Q&A: Logger and billing rates

Collapse
Posted by Jade Rubick on
I'm upgrading our intranet to OpenACS in a couple of weeks, and in the process of importing the hours logged in the old ACS intranet, I've run across this issue:

The old hour logger had the ability to associate a billing rate with an hour entry.

I can't really figure out a way to accomplish this same thing in logger.

I see two possibilities:

- add in logger_variables for each of the different rates, and when importing, make sure I enter them as each of those variables.

- modify logger in some way to add this functionality in. Looking at logger, I'm not really sure the best way to do this. The great thing about logger is that it is generic enough to track many different types of variables: time, hours, etc.. So I'm not sure what the cleanest way to do this would be.

The logger_variable table looks like this:

=# \d logger_variables;
                  Table "public.logger_variables"
   Column    |          Type          |          Modifiers          
-------------+------------------------+-----------------------------
 variable_id | integer                | not null
 name        | character varying(200) | 
 unit        | character varying(200) | 
 type        | character varying(50)  | not null default 'additive'
 package_id  | integer                | 

We need to be able to run reports monthly where we summarize their total bill, and they could be billed at multiple rates.

Perhaps we could add a column:

secondary_unit

and secondary_function which would by default be ''multiply'', but could also be ''divide'', or some other options.

Any thoughts on this? I have until the end of the week, so I'm on a pretty tight deadline for this.

Collapse
Posted by Jade Rubick on
After some more thought about this, and some discussion with the people here, I've thought of another possibility.

Perhaps a column could be added to the variables table that is called:

billable_p

That way, mileage, and other variables could still be marked as something that can be billed to a customer. Is that suitably general that it would be of interest to everyone?

Then perhaps there could be a parameter per instance which indicates whether or not billale should default to checked or unchecked?

Lars and Peter: if I provided the patch for Postgres, would this be suitable for logger?

Any better ideas? I guess the easiest of all would be to have a separate variable: billable hours.

Perhaps that's the best solution of all.

Collapse
Posted by Malte Sussdorff on
I got two questions in my head when reading your postings:

a) Why don't you store the amount of money (hours spend times hourly rate) ?

b) Does it make sense to add the unit (variable) price to each logger entry and if yes, can you make sure you have project defaults that can be overwritten when actually entering the unit ?

Collapse
Posted by Jade Rubick on
I eventually decided to make new variables/units for each hourly rate. The reason I did this is that we want to track both the number of hours spent, and the rate we're charging clients.

It might make sense to add the price to logger entries, but I'm not sure if that's the best idea design wise. If this becomes more of an issue with other people, perhaps someone will scratch that itch. For now, I'm going to live with it the way it is.

Thanks for your thoughts, Malte!