// Add stats date in install

This commit is contained in:
Jerome Nadaud
2013-10-16 14:44:49 +02:00
parent f225fb5f2c
commit dfd00bb064
2 changed files with 10 additions and 0 deletions
+6
View File
@@ -135,9 +135,15 @@ class EmployeeCore extends ObjectModel
if (empty($this->stats_date_from))
$this->stats_date_from = date('Y-m-d 00:00:00');
if (empty($this->stats_compare_from))
$this->stats_compare_from = date('Y-m-d 00:00:00');
if (empty($this->stats_date_to))
$this->stats_date_to = date('Y-m-d 23:59:59');
if (empty($this->stats_compare_to))
$this->stats_compare_to = date('Y-m-d 00:00:00');
return parent::getFields();
}
+4
View File
@@ -464,6 +464,10 @@ class InstallModelInstall extends InstallAbstractModel
$employee->bo_theme = 'default';
$employee->default_tab = 1;
$employee->active = true;
$employee->stats_date_from = date('Y').'-01-01';
$employee->stats_date_to = date('Y').'-12-31';
$employee->stats_compare_from = date('Y').'-01-01';
$employee->stats_compare_to = date('Y').'-12-31';
$employee->id_profile = 1;
$employee->id_lang = Configuration::get('PS_LANG_DEFAULT');
$employee->bo_menu = 1;