We are trying to update an employee's salary. The currency for the salary is IDR. TimeTrex is not letting us do the update. It says the Annual Hourly Rate is too high. The Hourly Rate is NOT too high - it is being calculated correctly. How do we enter the employee's salary?
Annual Hourly Rate is Too High
Re: Annual Hourly Rate is Too High
You will need to modify the classes/modules/users/UserWageFactory.class.php file, search for this block of code:
Then change the "> 1000" part to "> 100000" instead.
Such a change will disable automatic upgrades and may show a warning when a new version is released. However the above validation check will be changed to just a warning (instead of a hard validation error) in the next major version of TimeTrex.
Code: Select all
if ( $this->getHourlyRate() > 1000 ) {
$this->Validator->isTRUE( 'hourly_rate',
FALSE,
TTi18n::gettext('Annual Hourly Rate is too high') );
}
Such a change will disable automatic upgrades and may show a warning when a new version is released. However the above validation check will be changed to just a warning (instead of a hard validation error) in the next major version of TimeTrex.
Re: Annual Hourly Rate is Too High
Thanks - that worked! We are very grateful to be able to use your with the currency in our country.
Re: Annual Hourly Rate is Too High
Will the planned feature change be implemented for the API as well?
Re: Annual Hourly Rate is Too High
Warnings by default will only be shown to the consumers of the web interface, not to the API.
Re: Annual Hourly Rate is Too High
Because of this configuration, we continue to struggle with this problem using the API. Therefore, for others who use TimeTrex internationally, this may be helpful. Each time we upgrade to the latest version of TimeTrex, we run the following command.Warnings by default will only be shown to the consumers of the web interface, not to the API.
Code: Select all
sudo sed -i "s/$this->getHourlyRate() > 1000/$this->getHourlyRate() > 100000/g" /path/to/timetrex/classes/modules/users/UserWageFactory.class.php