> > Task (new)

rethink person salary

Summary

new
Apr 20, 2007
Apr 20, 2007 / pixtur
Jan 5, 2009 / phsouzacruz
pixtur
 

Attached files

No files uploaded
 
This topic should be used for discussing the person specific aspects of salary, money and efforts.

from class_person.inc.php line 361

            )),
             new FieldString(array('name'=>'salary_per_hour',
                'title'     =>__('Salary per hour') . " " . __('in Euro'),
                'default'   =>0.0,
                'export'    =>false,
            )),

pixtur thinks that this is not an optimal solution, because it limits the future usage of this feature. He suggest following procedure:
  1. salary should be a float to make sure the it's stored as valid in the database. (Since it is already inserted as float-field to the table, the field definition should be changed from "String" to "Internal")
  2. The currency should be either a variable for the complete streber installation or for each project. (whereas euro could be the default):
confGet('default_currency', 'EURO');
  1. We should rename person.salary_per_hour to person.default_salary
  2. We should add a new internal field person.default_salary_type which could be one of SALARY_PER_HOUR, SALARY_PER_DAY, SALARY_PER_PROJECT, etc.
  3. add new fields projectperson.salary and projectperson.salary_type
  4. add new field project.currency
  5. add new option for project.settings PROJECT_SETTING_SALARY (not sure about the labeling)




No Comments