Commit f34ecf33 authored by Jean-Paul Saman's avatar Jean-Paul Saman

Make use of "book year" to ease old/new years transition.

Booking for a new year now needs administrative intervention to change year.
parent 8cc19d62
......@@ -38,7 +38,8 @@ require_once( $CONFIG_FILE );
//Read the current config values from the config file and update the array.
$config_options = array(
"approval_by" => array( "value" => '' )
"approval_by" => array( "value" => '' ),
"book_year" => array( "value" => '' )
);
foreach ($config_options as $key=>$value){
......@@ -134,6 +135,11 @@ if (intval($obj->timesheet_period)) {
} else {
$obj->timesheet_period = $period->getTime();
}
// Set the correct year
if ( $config_options['book_year']['value'] != '' ) {
$period->setYear( intval($config_options['book_year']['value']) );
$obj->timesheet_period = $period->getTime();
}
// Get the current timesheet status
$status = $obj->timesheet_status;
......
<?php //Do not edit this file by hand, it will be overwritten by the configuration utility.
$TIMESHEET_CONFIG['approval_by'] = '2';
$TIMESHEET_CONFIG['book_year'] = '2008';
?>
......@@ -68,6 +68,11 @@ $config_options = array(
"value" => '',
'type' => 'select',
'list' => $users
),
"book_year" => array(
"description" => $AppUI->_('Book year'),
"value" => '',
"type" => 'text'
)
);
......
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