// Date Range picker improvements

This commit is contained in:
Jerome Nadaud
2013-10-17 11:39:02 +02:00
parent 6ed7ffc647
commit f9b115a2f8
5 changed files with 57 additions and 39 deletions
+5 -5
View File
@@ -135,16 +135,16 @@ class EmployeeCore extends ObjectModel
public function getFields()
{
if (empty($this->stats_date_from))
$this->stats_date_from = date('Y-m-d 00:00:00');
$this->stats_date_from = date('Y-m-d 00:00:00', strtotime("-1 month"));
if (empty($this->stats_compare_from))
$this->stats_compare_from = date('Y-m-d 00:00:00');
if (empty($this->stats_compare_from) || $this->stats_compare_from == '0000-00-00')
$this->stats_compare_from = null;
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');
if (empty($this->stats_compare_to) || $this->stats_compare_to == '0000-00-00')
$this->stats_compare_to = null;
return parent::getFields();
}