rounding rules via admin screen, round begin when starting record (#1229)
This commit is contained in:
@@ -36,10 +36,15 @@ class AppExtension extends Extension
|
||||
if (isset($config['timesheet']['duration_only'])) {
|
||||
@trigger_error('Configuration "kimai.timesheet.duration_only" is deprecated, please remove it', E_USER_DEPRECATED);
|
||||
if (true === $config['timesheet']['duration_only'] && 'duration_only' !== $config['timesheet']['mode']) {
|
||||
trigger_error('Found ambiguous configuration. Please remove "kimai.timesheet.duration_only" and set "kimai.timesheet.mode" instead.');
|
||||
trigger_error('Found ambiguous configuration: remove "kimai.timesheet.duration_only" and set "kimai.timesheet.mode" instead.');
|
||||
}
|
||||
}
|
||||
|
||||
// we use a comma sepearated string internally, to be able to use it in combination with the database configuration system
|
||||
foreach ($config['timesheet']['rounding'] as $name => $settings) {
|
||||
$config['timesheet']['rounding'][$name]['days'] = implode(',', $settings['days']);
|
||||
}
|
||||
|
||||
// safe alternatives to %kernel.project_dir%
|
||||
$container->setParameter('kimai.data_dir', $config['data_dir']);
|
||||
$container->setParameter('kimai.plugin_dir', $config['plugin_dir']);
|
||||
|
||||
Reference in New Issue
Block a user