Hi
I'm writing an application that calculates working hours for billing.
there are three levels of billing. one for regular hours, one for
evening/nights, and one for saturdays/holidays.
My first decision is wether I make these calculations in a database view
(If I understand correctly, it would be calculated only once - when
creating the entry or modify it - or am I wrong?) or just put the
regular working hours in the database, and calculate it in the application
(and this way it would be calculated every time I view the page)?
If I'm right and it's better to put it in the database, I really need help
designing the database... (of-course it's an open-source project).
my idea is to create one table that define default hours/days ranges for
the three levels of billing, one table to define client specific ranges, a
table with charging information (charge per hour for every level of
billing for every customer), tables that define custommers, and job
details and a final view that summerize everything.
my main problem is how do I define an hour range from friday 15:00 to
sunday 08:00, and how to create a function that compares the working hours
with this range?
thanx
--
Haim