Requirement: I am designing a Customer invoice system for a service
company. company has some default rates across the company which is
based on designation, experience level, qualification etc. These rates
can be changed for a particular project. So project rates can overwrites
the default rates
The way I am doing is:
- create defaultrates tables which will be pre-populated with the
default rate data
- Project table contain information about project
- projectrates table which contain exactly same fields as defaultrates
table, except it will also contain foreign keys with project table (id)
and defaultrates table(id).
When the project is created projectrates table will be populated with
all the data present in defaultrates table along with project_id
If user want to change the rates for a particular project, then
projectrates table will be edited matching the particular project id
- User will create the project, at back-end projectrates table should
be populated with the data from defaultrates table along with
project-id. how to do this??
- show.rhtml , showing details of particular project should also show
the details of project rates
- edit.rhtml editing project, should also give user the functionality
to edit project rates
Please it is important for me, so let me know how to do this?