Allow custom date filter with no start date

This commit is contained in:
nathangray 2016-05-27 10:36:51 -06:00
parent c6fd40b9e0
commit 7bb9577c6f

View File

@ -471,7 +471,13 @@ class timesheet_ui extends timesheet_bo
function get_rows(&$query_in,&$rows,&$readonlys,$id_only=false) function get_rows(&$query_in,&$rows,&$readonlys,$id_only=false)
{ {
$this->show_sums = false; $this->show_sums = false;
// Date filter
$end_date = $query_in['enddate'] ? $query_in['enddate'] : false; $end_date = $query_in['enddate'] ? $query_in['enddate'] : false;
if($end_date || $query_in['filter'] === 'custom')
{
$query_in['startdate'] = $query_in['startdate'] ? $query_in['startdate'] : 1;
}
$date_filter = $this->date_filter($query_in['filter'],$query_in['startdate'],$end_date); $date_filter = $this->date_filter($query_in['filter'],$query_in['startdate'],$end_date);
if ($query_in['startdate']) if ($query_in['startdate'])