// Add stats date in install
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user