Commit 07af9ee0 authored by Jean-Paul Saman's avatar Jean-Paul Saman

Only change year to book_year when it is about a new timesheet. If the...

Only change year to book_year when it is about a new timesheet. If the timesheet already exists use its date.
parent f34ecf33
......@@ -133,11 +133,10 @@ $period = new CDate();
if (intval($obj->timesheet_period)) {
$period->setDate($obj->timesheet_period,DATE_FORMAT_UNIXTIME);
} else {
$obj->timesheet_period = $period->getTime();
}
// Set the correct year
if ( $config_options['book_year']['value'] != '' ) {
// Set the correct year
if ( $config_options['book_year']['value'] != '' ) {
$period->setYear( intval($config_options['book_year']['value']) );
}
$obj->timesheet_period = $period->getTime();
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment